Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
33850 | qwertyuiop | 【USACO】你的飞碟在这儿! | C++ | 解答错误 | 0 MS | 252 KB | 468 | 2023-12-31 14:24:35 |
#include<bits/stdc++.h> using namespace std; string s,s1,s2,st; long long a,b=1; int main(){ st="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cin>>s1>>s2; for(int i=0;i<s1.size();i++){ for(int j=0;j<26;j++){ if(st[j]==s1[i]){ a=a*(st[j]-'0'); break; } } } for(int i=0;i<s2.size();i++){ for(int j=0;j<26;j++){ if(st[j]==s2[i]){ b=b*(st[j]-'0'); break; } } } if(a%47==b%47)cout<<"GO"; else cout<<"STAY"; return 0; }