标签:+= ref 状态 pre sub typedef page nbsp sed
2
10
1 #include <iostream> 2 3 using namespace std; 4 typedef long long ll; 5 ll get_minn(ll x) 6 { 7 ll ans=0; 8 while(x>0) 9 { 10 ans+=x/5; 11 x/=5; 12 } 13 return ans; 14 } 15 int main() 16 { 17 ll q; 18 cin>>q; 19 if(q==0) 20 { 21 cout<<"0"<<endl; 22 return 0; 23 } 24 ll n=0,temp=0; 25 while(temp<q) 26 { 27 n+=5; 28 temp=get_minn(n); 29 } 30 if(temp>q) 31 cout<<"No solution"<<endl; 32 else if(temp==q) 33 cout<<n<<endl; 34 // cout << "Hello world!" << endl; 35 return 0; 36 }
标签:+= ref 状态 pre sub typedef page nbsp sed
原文地址:https://www.cnblogs.com/scott527407973/p/9306844.html