编译是对的,但是wa了五个点
查看原帖
编译是对的,但是wa了五个点
1121335
jiakunnan楼主2023/10/5 18:11
#include<bits/stdc++.h>
using namespace std;
int main()
{
	string a,b;
	getline(cin,a);
	getline(cin,b);
	int len1=a.size();
	int sum=0,cnt=1;
	int len2=b.size();
	int s=0,c=1;
	for(int i=0;i<=len1-1;i++)
	{
		for(int j=i+1;j<=len1;j++)
		{
			a[j]=int(a[i])-64;
			sum=a[j];
			cnt*=sum;
			sum=0;	
		}		
	}
	for(int i=0;i<=len2-1;i++)
	{
		for(int j=i+1;j<=len2;j++)
		{
			a[j]=int(a[i])-64;
			s=a[j];
			c*=s;
			s=0;	
		}		
	}
	if(cnt%47==c%47)
	{
		cout<<"GO";
	}
	else
	{
		cout<<"STAY";
	}
	return 0;
}
2023/10/5 18:11
加载中...