usaco your ride is here

#include<fstream>
using namespace std;
ifstream fin("ride.in");
ofstream fout("ride.out");
int main()
{
    int a[2]={1,1};
    char s[7];
    for(int i=0;i<=1;i++)
    {
        fin>>s;
        for(int j=0;s[j]!='\0';j++)
        {
            a[i]*=s[j]-'@';
        }
    }
    if((a[0]-a[1])%47)
        fout<<"STAY"<<endl;
    else
        fout<<"GO"<<endl;
    return 0;
}
原文地址:https://www.cnblogs.com/riverphoenix/p/riverphoenix.html