今天开始切USACO 加油
/* ID: aznfy1 PROG: ride LANG: C++ */ #include <iostream> #include <fstream> #include <string> #include <stdio.h>using namespace std;char a[10],b[10];int main() {freopen("ride.in","r",stdin);freopen("ride.out","w",stdout);while(gets(a)){gets(b);int sum1=1;int sum2=1;for(int i=0;a[i]!='\0';i++)sum1*=(a[i]-'A'+1);for(int i=0;b[i]!='\0';i++)sum2*=(b[i]-'A'+1);if((sum1%47)==(sum2%47))printf("GO\n");elseprintf("STAY\n");}return 0; }