c++50分求助!!!

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

@[gucencena](/space/show?uid=130511) 请不要用Markdown来强调头文件的重要性
by Thomasguo666 @ 2019-07-15 16:23:25


请用好你的代码格式,谢谢
by 天际之光 @ 2019-07-15 16:24:46


```cpp #include<iostream> #include<algorithm> #include<string> #include<cmath> #include<cstdio> using namespace std; int main() { char huixing[8] = {' ', ' ',' ',' ',' ',' ',' '}; char group[8] = {' ',' ',' ',' ',' ',' ',' '}; int i = 0; int j = 0; int total_xing = 0; int total_group = 0; int result_xing = 0; int result_group = 0; while((huixing[i] = getchar()) != '\n') { i++; } while((group[j] = getchar()) != '\n') { j++; } i = 1; j = 1; while(huixing[i] != '\n'){ total_xing = huixing[i] - 'A'; i++; } while(group[j] != '\n') { total_group = group[j] - 'A' + 1; j++; } result_xing = total_xing % 47; result_group = total_group % 47; if(result_xing == result_group) { cout << "GO" << endl; } else { cout << "STAY" << endl; } return 0; } ```
by Ln_YJIn @ 2019-07-15 19:36:13


@[gucencena](/space/show?uid=130511) 下次请您这样发代码
by Ln_YJIn @ 2019-07-15 19:36:54


爱您!!!
by gucencena @ 2019-07-16 13:18:05


|