#include <stdio.h>
#include <stdlib.h>
//洛谷1200//
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define N 8
int main(int argc, char *argv[]) {
char a[N],b[N];
int i=0,s1=1,s2=1;
while(getchar()!='\n')
{
scanf("%c",&a[i]);
s1*=(a[i++]-'A'+1);
}
i=0;
while(getchar()!='\n')
{
scanf("%c",&b[i]);
s2*=(b[i++]-'A'+1);
}
if((s1%47)==(s2%47))
{
printf("GO");
}
else
printf("STAY");
return 0;
}
为什么输出结果不对?是哪里出错了?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-