能否问问为什么是90分,感觉和题解都差不多。求大神指点

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

啊,不好意思,我的源代码是这样的。 ```cpp #include<iostream> #include<cstring> using namespace std; int main() { int m=1,n=1; char a[6],b[6]; memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); cin.get(a,7); cin.ignore(7,'\n'); cin.get(b,7); for(int i=0;i<6;i++) { if(a[i]!=0) m*=(a[i]-'A'+1); if(b[i]!=0) n*=(b[i]-'A'+1); } if(m%47==n%47) cout<<"GO"; else cout<<"STAY"; return 0; } ```
by LDlornd @ 2017-02-26 15:18:49


|