WHY CE?

P1200 [USACO1.1] 你的飞碟在这儿 Your Ride Is Here

好吧我个傻X…… 连cin都没写 但是写了一样报错
by 管理b员 @ 2017-06-29 18:39:59


WHY 50分? ```cpp #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int x=1,y=1; string m,n; int p=m.length(),q=n.length(); for(int i=0;i<p;i++) { x*=(m[i]-64); x%=49; } for(int j=0;j<q;j++) { y*=(n[j]-64); y%=49; } if(x=y) cout<<"GO"; else cout<<"STAY"; return 0; } ```
by 管理b员 @ 2017-06-29 18:49:14


hh居然把47打成了49 ```cpp #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int x=1,y=1; string m,n; int p=m.length(),q=n.length(); for(int i=0;i<p;i++) { x*=(m[i]-64); x%=49; } for(int j=0;j<q;j++) { y*=(n[j]-64); y%=49; } if(x=y) cout<<"GO"; else cout<<"STAY"; return 0; } ```
by 管理b员 @ 2017-06-29 18:52:45


@[远相遥望](/space/show?uid=39013) 复制bug ```cpp #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int x=1,y=1; string m,n; int p=m.length(),q=n.length(); for(int i=0;i<p;i++) { x*=(m[i]-64); x%=47; } for(int j=0;j<q;j++) { y*=(n[j]-64); y%=47; } if(x=y) cout<<"GO"; else cout<<"STAY"; return 0; } ```
by 管理b员 @ 2017-06-29 19:08:33


自我纠正 ```cpp #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int x=1,y=1; string m,n; cin>>m>>n; int p=m.length(),q=n.length(); for(int i=0;i<p;i++) { x*=(m[i]-64); x%=47; } for(int j=0;j<q;j++) { y*=(n[j]-64); y%=47; } if(x==y) cout<<"GO"; else cout<<"STAY"; return 0; } ```
by 管理b员 @ 2017-06-30 21:08:03


|