标签:
Description
Input
Output
Sample Input
Sample Output
1 #include <stdio.h> 2 int gcd(int a,int b) 3 { 4 return b==0?a:gcd(b,a%b); 5 } 6 int main() 7 { 8 int T; 9 scanf("%d",&T); 10 while(T--) 11 { 12 int m,n; 13 scanf("%d%d",&m,&n); 14 int j=gcd(n,m); 15 //printf("%d\n",j); 16 if(j==1) 17 printf("NO\n"); 18 else 19 printf("YES\n"); 20 } 21 return 0; 22 }
标签:
原文地址:http://www.cnblogs.com/huangguodong/p/4739682.html