#include<iostream>
#include<string>
using namespace std;

int main(){
    string a,b ;
    long m,n;
    m=1;n=1;
    cin>>a>>b;
    
    for(int i = 0 ; i < a.length(); i++) 
    {
        m *= (a[i] - 64);
        m = m % 47;
    }
        
        
    for(int i = 0 ; i < b.length(); i++) 
    {
        n *= (b[i] - 64);
        n = n % 47;
    }
        
    if(m % 47 == n % 47)    
    {
            cout<<"GO"<<endl;
            cout<<"r1=r2="<<m%47<<endl;
    }
    else 
    {
        cout<<"STAY"<<endl;
        cout<<"r1="<<m%47<<" r2="<<n%47<<endl;
    }
    //cout<<m<<" "<<n<<endl;
    return 0;
}

 

相关文章:

  • 2021-11-29
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2021-07-19
  • 2021-12-30
  • 2021-07-07
猜你喜欢
  • 2021-05-21
  • 2021-12-13
  • 2022-02-12
  • 2021-12-06
  • 2021-12-26
  • 2021-08-05
  • 2021-12-04
相关资源
相似解决方案