so easy a question,不過由於本身的粗心,浪費了太多的時間,實在不該該。ide
/* ID: whutzha1 PROG: ride LANG: C++ */ #include<fstream> using namespace std; ifstream cin("ride.in"); ofstream cout("ride.out"); int main() { char group_name[6]; char comet_name[6]; int i; int num1=1; int num2=1; cin>>group_name; cin>>comet_name; for(i=0;group_name[i]!='\0';i++) { num1*=(group_name[i]-64); } for(i=0;comet_name[i]!='\0';i++) { num2*=(comet_name[i]-64); } if ((num1-num2)%47) cout<<"STAY"<<endl; else cout<<"GO"<<endl; return 0; }