题目链接:https://www.luogu.com.cn/problem/P1200
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s1, s2;
cin >> s1 >> s2;
int n1 = 1;
for (auto x : s1)
{
n1 *= x - 'A' + 1;
}
int n2 = 1;
for (auto x : s2)
{
n2 *= x - 'A' + 1;
}
if (n1 % 47 == n2 % 47)
{
cout << "GO" << endl;
}
else
{
cout << "STAY" << endl;
}
return 0;
}