2 solutions
- 1
Information
- ID
- 200
- Time
- 1000ms
- Memory
- 125MiB
- Difficulty
- 1
- Tags
- # Submissions
- 50
- Accepted
- 41
- Uploaded By
#include #include
using namespace std;
string s,t;
int calc(string s){ int res = 1; for (int i=0;i < s.length(); i++) res *= s[i] -'A' + 1; return res % 47; }
int main(){ cin >> s >> t;
if ( calc(s) == calc(t) )
cout << "GO";
else
cout << "STAY";
}
By signing up a HFOJ universal account, you can submit code and join discussions in all online judging services provided by us.