| 记录编号 | 82993 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 558.奇怪的函数 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.003 s | ||
| 提交时间 | 2013-11-28 22:44:41 | 内存使用 | 0.29 MiB | ||
/*
对数运算优化+二分查找
*/
#include<cstdio>
#include<cmath>
using namespace std;
long long num,n;
int main()
{
freopen("xx.in","r",stdin);
freopen("xx.out","w",stdout);
scanf("%lld",&n);
long long L=1,R=n+1;
while(L<R)
{
long long M=(L+R)/2;
double k=M*log(double(M))/log(10.0);
if(k+1>=n)
R=M;
else
L=M+1;
}
printf("%lld",(L+R)/2);
return 0;
}