A15022 | Division?
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
Codeforces separates its users into $4$ divisions by their rating:
- For Division 1: $1900 \leq \mathrm{rating}$
- For Division 2: $1600 \leq \mathrm{rating} \leq 1899$
- For Division 3: $1400 \leq \mathrm{rating} \leq 1599$
- For Division 4: $\mathrm{rating} \leq 1399$
Given a $\mathrm{rating}$ , print in which division the $\mathrm{rating}$ belongs.
- For Division 1: $1900 \leq \mathrm{rating}$
- For Division 2: $1600 \leq \mathrm{rating} \leq 1899$
- For Division 3: $1400 \leq \mathrm{rating} \leq 1599$
- For Division 4: $\mathrm{rating} \leq 1399$
Given a $\mathrm{rating}$ , print in which division the $\mathrm{rating}$ belongs.
输入格式
The first line of the input contains an integer $t$ ( $1 \leq t \leq 10^4$ ) — the number of testcases.
The description of each test consists of one line containing one integer $\mathrm{rating}$ ( $-5000 \leq \mathrm{rating} \leq 5000$ ).
The description of each test consists of one line containing one integer $\mathrm{rating}$ ( $-5000 \leq \mathrm{rating} \leq 5000$ ).
输出格式
For each test case, output a single line containing the correct division in the format "Division X", where $X$ is an integer between $1$ and $4$ representing the division for the corresponding rating.
输入输出样例
输入 #1
7 -789 1299 1300 1399 1400 1679 2300
输出 #1
Division 4 Division 4 Division 4 Division 4 Division 3 Division 2 Division 1
For test cases $1-4$ , the corresponding ratings are $-789$ , $1299$ , $1300$ , $1399$ , so all of them are in division $4$ .
For the fifth test case, the corresponding rating is $1400$ , so it is in division $3$ .
For the sixth test case, the corresponding rating is $1679$ , so it is in division $2$ .
For the seventh test case, the corresponding rating is $2300$ , so it is in division $1$ .
For the fifth test case, the corresponding rating is $1400$ , so it is in division $3$ .
For the sixth test case, the corresponding rating is $1679$ , so it is in division $2$ .
For the seventh test case, the corresponding rating is $2300$ , so it is in division $1$ .
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted