竞赛讨论区 > 求助E题为什么wa了
头像
列车与海浮生未歇
发布于 2018-09-16 09:40
+ 关注

求助E题为什么wa了

include<cstdio> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<sstream> #include<stack> #include<map> #define INF 1e9 #define mod 100003 using namespace std; const int maxn=1000; typedef long long ll; map<int,int>mp;   int main(){     int n,m;  scanf("%d%d",&n,&m);  if(m==n){   puts("Yes");   return 0;  }  else if(m==1){   puts("No");   return 0;  }  else{  int flag=0; while(n>=m){             n=n%m+n/m;     if(n==1){flag=1;}             }     if(flag==1)puts("Yes");     else         puts("No");     }  return 0;
}
求助E题为什么wa了?

全部评论

(1) 回帖
加载中...
话题 回帖

等你来战

查看全部

热门推荐