include
include
using namespace std;
string a , b ;
int ans = 1 , num = 1 ;
main()
{
cin >> a >> b ;
for( int i = 0 ; i < a.length() ; i ++ )
{
ans *= a[i] - ‘@’ ;
}
for( int i = 0 ; i < b.length() ; i ++ )
{
num *= b[i] - ‘@’;
}
ans %= 47 , num %= 47 ;
if( ans == num )
{
cout << “GO” ;
}
else
{
cout << “STAY” ;
}
return 0 ;
}

本文介绍了一个简单的C++程序,该程序通过计算两个字符串中字符的特定数值来判断这两个字符串是否匹配。通过将每个字符转换为数值并进行比较,可以快速得出结论。

1127

被折叠的 条评论
为什么被折叠?



