1 条题解

  • 1
    @ 2026-7-19 16:09:03

    一模一样

    #include<bits/stdc++.h>
    using namespace std;
    const int N=1e5+10;
    const int INF=0x3f3f3f3f;
    string s,s1;
    long long cnt1=1,cnt2=1;
    signed main()
    {
    	cin>>s;
    	cin>>s1;
    	for(int i=0;i<s.size();i++)
    	{
    		cnt1*=(int(s[i])-64);
    		cnt1=cnt1%47;
    	//	cout << cnt1 << " ";
    	}
    	for(int i=0;i<s1.size();i++)
    	{
    		cnt2*=(int(s1[i])-64);
    		cnt2=cnt2%47;
    	//	cout << cnt2 << " ";
    	}
    	cnt1=cnt1%47;
    	cnt2=cnt2%47;
    	if(cnt1==cnt2)
    	{
    		cout << "GO\n" << "r1=r2=" << cnt1;
    	}
    	else cout << "STAY\n" << "r1=" << cnt1 << " " << "r2=" << cnt2;
    	return 0;
    }
    
    
    • 1

    你要乘坐的飞碟在这里-Your Ride Is Here

    信息

    ID
    544
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    97
    已通过
    35
    上传者