Your Ride Is Here
纯粹的水题= =
1 /* 2 ID:yk652321 3 LANG:C++ 4 TASK:ride 5 */ 6 7 #include<iostream> 8 #include<cstring> 9 #include<cstdio> 10 using namespace std; 11 12 char s1[20],s2[20]; 13 int L1,L2,sum1=1,sum2=1; 14 15 int main() 16 { 17 freopen("ride.in","r",stdin); 18 freopen("ride.out","w",stdout); 19 scanf("%s %s",s1,s2); 20 L1=strlen(s1); 21 L2=strlen(s2); 22 for(int i=0;i<L1;i++) 23 { 24 sum1*=s1[i]-'A'+1; 25 sum1%=47; 26 } 27 for(int i=0;i<L2;i++) 28 { 29 sum2*=s2[i]-'A'+1; 30 sum2%=47; 31 } 32 if(sum1==sum2) 33 cout<<"GO"<<endl; 34 else cout<<"STAY"<<endl; 35 return 0; 36 }