65 条题解
-
-1
新手上路,请多关照!!
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if(n == 1) { cout << "swim"; } if(n == 3) { cout << "program"; } if(n == 5) { cout << "read"; } if(n == 6) { cout << "math"; } if(n == 2 or n == 4 or n == 7) { cout << "rest"; } return 0; }
-
-1
C++
#include <iostream> using namespace std; int main(int argc, char *argv[]`) { int playerinput; cin >> playerinput; if (n == 1) cout << "swim"; if (n == 3) cout << "program"; if (n == 5) cout << "read"; if (n == 6) cout << "math"; if (n == 2 or n == 4 or n == 7) cout << "rest"; return 0 }
Pascal
program Main; var playerinput: integer; begin readln(playerinput); if playerinput = 1 then writeln('swim') else if playerinput = 3 then writeln('program') else if playerinput = 5 then writeln('read') else if playerinput = 6 then writeln('math') else if (playerinput = 2) or (playerinput = 4) or (playerinput = 7) then writeln('rest'); end
Python
playerinput = int(input()) if playerinput == 1: print('swim') elif playerinput == 3: print('program') elif playerinput == 5: print('read') elif playerinput == 6: print('math') elif playerinput in [2, 4, 7]: print('rest')
信息
- ID
- 666
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 4
- 标签
- 递交数
- 8405
- 已通过
- 3903
- 上传者