P2759 奇怪的函数

sczyyds
sczyyds
sczyyds
I can't forget

你需要知道怎么求位数

#include<cmath>
#include<cstdio>
#include<iostream>
#define ll long long
using namespace std;
ll n;
int main(){
	//scanf("%lld",&n);
	cin>>n;
	ll l=0,r=2000000009;
	while(l<r){
		 ll mid=(l+r)>>1;
		 if((ll)(mid*log10(1.0*mid))+1<n)
		 l=mid+1;
		 else
		 r=mid;
	} 
	cout<<l<<endl;
	return 0;
}
posted @ 2021-07-10 11:47  Simex  阅读(33)  评论(0)    收藏  举报