标签:
★☆ 输入文件:xx.in
输出文件:xx.out
简单对比
时间限制:1 s 内存限制:32 MB
1 #include<cstdio> 2 #include<cmath> 3 #define maxx 10000000000 4 using namespace std; 5 unsigned long long x,ans,l=1,r=maxx; 6 unsigned long long n; 7 unsigned long long f(unsigned long long x){ 8 return (x*(log10(x))+1); 9 } 10 int main(){ 11 scanf("%lld",&n); 12 while(l<r){ 13 x=(l+r)/2; 14 if(f(x)<n) l=x+1; 15 else r=x; 16 } 17 printf("%lld",l); 18 return 0; 19 }
标签:
原文地址:http://www.cnblogs.com/yuemo/p/5532635.html