标签:
Description
Input
Output
Sample Input
Sample Output
1 #include <cstdio> 2 using namespace std; 3 long long hcf(long long a,long long b) 4 { 5 if(b==0) 6 return a; 7 else 8 return hcf(b,a%b); 9 } 10 int main() 11 { 12 int t; 13 long long m,n; 14 scanf("%d",&t); 15 while(t--) 16 { 17 scanf("%d%d",&m,&n); 18 if(hcf(m,n)==1) 19 printf("NO\n"); 20 else 21 printf("YES\n"); 22 } 23 return 0; 24 }
标签:
原文地址:http://www.cnblogs.com/www-cnxcy-com/p/4740410.html