标签:padding logs esc lin else tom can ext floor
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 2221 Accepted Submission(s): 882
1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long double ll; 4 inline ll gcd(ll x) 5 { 6 int k,t; 7 int flag=0; 8 for(k=1;k<=5;k++) 9 { 10 x=(long long)sqrt(x); 11 if(x==1) 12 { 13 flag=1; 14 t=k; 15 break; 16 } 17 } 18 if(flag) 19 return t; 20 return 0; 21 } 22 int main() 23 { 24 ll n; 25 while(cin>>n) 26 { 27 if(!gcd(n)) 28 cout<<"TAT"<<endl; 29 else cout<<gcd(n)<<endl; 30 } 31 return 0; 32 }
标签:padding logs esc lin else tom can ext floor
原文地址:http://www.cnblogs.com/ECJTUACM-873284962/p/7148847.html