题目链接https://www.luogu.org/problemnew/show/P1200
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
char b[10],d[10];
int main()
{
long long a=1,r=1;
scanf("%s",&b);scanf("%s",&d);
int f = strlen(b);
int g = strlen(d);
for(int i = 0;i < f ;i++)
{
a=a*(b[i]-'A'+1);
}
for(int j = 0;j < g ;j++)
{
r=r*(d[j]-'A'+1);
}
if(a % 47 == r % 47 )
{
printf("GO\n");
}
else{
printf("STAY\n");
}
return 0;
}