This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#include<iostream>
using namespace std;
//知识点:字符串中字符的索引方式,ASCII的数字转换:64
int main() {
string a;
string b;
cin >>a>>b;
int sum1=1;
for(int i=0; i<a.length(); i++) {
int c=a[i]-64;
sum1=sum1*c;
}
int sum2=1;
for(int i=0; i<b.length(); i++) {
int c=b[i]-64;
sum2=sum2*c;
if(sum1%47==sum2%47) {
cout<<"GO"<<endl;
} else {
cout<<"STAY"<<endl;
return 0;