自己电脑上应该是AC了,这上面只有50分,估计是GO的都错了

P1200 [USACO1.1] 你的飞碟在这儿 Your Ride Is Here

希望更丰富的展现?[使用Markdown](https://www.luogu.org/wiki/show?name=帮助:markdown)
by ⚡进击_蒟蒻⚡ @ 2019-10-11 12:58:14


不要用markdown来强调头文件的重要性
by C6H10O5 @ 2019-10-11 12:58:39


#include<iostream> #include<string> using namespace std; int tp(char a) { int x ; x=a; x-=64; return x; } int lc(string a) { int i,x=1,j; for(i=0;i<6;i++) { j=tp(a[i]); x*=j; } return x; } int main() { string a,b; int i,j; cin>>a; cin>>b; i=lc(a); j=lc(b); if (i%47==j%47) cout<<"GO"; else cout<<"STAY"; return 0; }
by ianYoung @ 2019-10-11 12:59:05


...
by Pisces @ 2019-10-11 13:06:11


@[ianYoung](/space/show?uid=264466) 这题你随便输出一个go或者一个stay都有50分呀。。。
by Bbaka @ 2019-10-11 14:01:38


@[ianYoung](/space/show?uid=264466) 可能知道你的问题了,题目的字符串长度是1到6而不是固定为6,所以说你计算的时候循环有问题
by Bbaka @ 2019-10-11 14:04:16


@[IQZ_](/space/show?uid=138440) 好的,我等会改改试试。
by ianYoung @ 2019-10-11 14:50:45


@[IQZ_](/space/show?uid=138440) 奇怪的是,我在电脑上第一个是AC的,结果在这就不行。
by ianYoung @ 2019-10-11 14:57:15


@[ianYoung](/space/show?uid=264466) 可能是评测环境的原因,还有你的代码还是有问题
by Bbaka @ 2019-10-11 16:35:35


|