中文显然不行
by yuchenren @ 2022-01-12 19:01:13
不能以中文为测试数据
by yuchenren @ 2022-01-12 19:01:44
但好像设置编码可以解决这个问题。
~~**宣传私题预警**~~
https://www.luogu.com.cn/problem/T199899
```cpp
#include <bits/stdc++.h>
using namespace std;
void judge(int n) {
if (1 <= n && n <= 4) cout << "魂土";
if (5 <= n && n <= 14) cout << "魂师";
if (15 <= n && n <= 34) cout << "大魂师";
if (35 <= n && n <= 39) cout << "魂王";
if (40 <= n && n <= 49) cout << "魂宗";
if (50 <= n && n <= 54) cout << "魂尊";
if (55 <= n && n <= 59) cout << "魂帝";
if (60 <= n && n <= 69) cout << "赤炎斗罗";
if (70 <= n && n <= 79) cout << "巅峰斗罗";
if (80 <= n && n <= 89) cout << "封号斗罗";
if (90 <= n && n <= 100) cout << "海神";
cout << endl;
}
int main() {
int n, a[101] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
judge(a[i]);
}
return 0;
}
```
提交是没问题的
by yuchenren @ 2022-01-12 19:04:13
用~~编码~~
by Yellow_and_Black @ 2022-01-13 15:07:32