#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char H[6],G[6];
gets(H);
gets(G);
int h1=strlen(H),g1=strlen(G),h2=1,g2=1,a,b;
for(a=0;a<h1;a++) h2*=(H[a]-64);
for(b=0;b<g1;b++) g2*=(G[b]-64);
if((h2%47)==(g2%47)) printf("GO\n");
else printf("STAY\n");
system("pause");
return 0;
}
80分,求助,代码如上