2017ACM/ICPC广西邀请赛 A Math Problem

解法:发现。。最多15个,那么。。暴力一下啦

 1 #include <iostream>
 2 #include <stdio.h>
 3 #include <vector>
 4 #include <string.h>
 5 #include <map>
 6 using namespace std;
 7 struct Node{
 8     int x,y;
 9 }node[123];
10 map<int,int>Mp;
11 long long n;
12 map<int,int>::iterator it;
13 int main(){
14     while(~scanf("%lld",&n)){
15         int sum=0;
16         for(int i=1;i<=20;i++){
17             long long x=1;
18             for(int j=1;j<=i;j++){
19                 x*=i;
20                 if(x>=1e18+1){
21                 break;
22                 }
23             }
24             if(x<=n){
25                 sum++;
26             }
27         }
28         cout<<sum<<endl;
29     }
30     return 0;
31 }

 

转载于:https://www.cnblogs.com/yinghualuowu/p/7458657.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值