本文共 807 字,大约阅读时间需要 2 分钟。
二分
#include#include #include #include #include #include #include #include #include #include #include #include #include #define C 0.5772156649#define pi acos(-1.0)#define ll long long#define mod 1000000007#define ls l,m,rt<<1#define rs m+1,r,rt<<1|1#pragma comment(linker, "/STACK:1024000000,1024000000")using namespace std;const double g=10.0,eps=1e-7;const int N=100000+10,maxn=500+100,inf=0x3f3f3f;ll getzero(ll k){ ll ans=0; while(k){ ans+=k/5; k/=5; } return ans;}int main(){ ios::sync_with_stdio(false); cin.tie(0); ll t,cnt=0; cin>>t; while(t--){ ll n; cin>>n; ll l=1,r=500000000; while(l<=r){ ll m=(l+r)/2; if(getzero(m)
转载于:https://www.cnblogs.com/acjiumeng/p/7228179.html