标签:style blog io color sp for div log bs
1 /* 2 PROBLEM:CF 485A 3 AUTHER:Nicole 4 MEMO:数学 5 */ 6 7 #include<cstdio> 8 using namespace std; 9 int main() 10 { 11 int a,m; 12 scanf("%d%d",&a,&m); 13 int flag[100010]={0}; 14 int f=1; 15 while (f==1) 16 { 17 a=(a+a)%m; 18 if (a==0) break; 19 if (flag[a]==0) flag[a]=1;else f=0; 20 } 21 if (f==0) printf("No\n"); 22 else printf("Yes\n"); 23 return 0; 24 }
标签:style blog io color sp for div log bs
原文地址:http://www.cnblogs.com/NicoleLam/p/4084697.html