#include<cstdio>
using namespace std;
int main()
{char a[10],b[10];
int x,y,m=1,n=1;
scanf("%s%s",a,b);
for(int i=0;i<strlen(a);i++)
{m*=(a[i]-'A'+1);}
for(int j=0;j<strlen(b);j++)
{n*=(b[j]-'A'+1);}
x=m%47;
y=n%47;
if(x==y)cout<<"GO";
else cout<<"STAY";
return 0;
}
[USACO1.1]你的飞碟在这儿Your Ride Is He…
于 2018-01-26 09:38:07 首次发布