90分求助

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

id好评
by xzy062609 @ 2020-02-01 12:49:08


不知道
by inoichi_lim @ 2020-02-01 13:11:56


```cpp #include<iostream> #include<cstring> using namespace std; int main() { char comet[7];//char c; char group[7]; int i,num1=1,num2=1,N; cin.getline(comet,7); cin.getline(group,7); N=strlen(comet); for(i=0;i<N;i++) { num1=num1*(comet[i]-'A'+1); } N=strlen(group); for(i=0;i<N;i++) { num2=num2*(group[i]-'A'+1); } if(num1%47==num2%47) cout<<"GO"; else cout<<"STAY"; return 0; } ``` emmm似乎是cin.get()的问题(~~其实好像是洛谷的问题~~),我在另外一个程序里用cin.get()也没过...还是乖乖用getline吧QAQ
by This_is_an_account @ 2020-02-01 16:54:52


@[This_is_an_account](/user/312533) 我也90,而且第一个测试点报错,我下载数据测试没错
by wzl13329349595 @ 2020-02-07 20:59:47


@[wzl13329349595](/user/317306) 我也!!90在那就过不去了,下载数据测试明明也是对的
by li24 @ 2020-02-08 15:51:17


@[wzl13329349595](/user/317306) 我也是第一个测试点没过...但后面改成用getline()函数就过了,有点神奇hhh
by This_is_an_account @ 2020-02-08 16:07:15


|