CF1669A.Division?

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Codeforces separates its users into 44 divisions by their rating:

  • For Division 1: 1900≤rating1900 \leq \mathrm{rating}
  • For Division 2: 1600≤rating≤18991600 \leq \mathrm{rating} \leq 1899
  • For Division 3: 1400≤rating≤15991400 \leq \mathrm{rating} \leq 1599
  • For Division 4: rating≤1399\mathrm{rating} \leq 1399

Given a rating\mathrm{rating}, print in which division the rating\mathrm{rating} belongs.

Codeforces 根据用户的评分(rating)将其用户分为 44 个组别:

  • 第 1 组:1900≤rating1900 \leq \mathrm{rating}
  • 第 2 组:1600≤rating≤18991600 \leq \mathrm{rating} \leq 1899
  • 第 3 组:1400≤rating≤15991400 \leq \mathrm{rating} \leq 1599
  • 第 4 组:rating≤1399\mathrm{rating} \leq 1399

给定一个 rating\mathrm{rating},请输出该 rating\mathrm{rating} 所属的组别。

输入格式

The first line of the input contains an integer tt (1≤t≤1041 \leq t \leq 10^4) — the number of testcases.

The description of each test case consists of one line containing one integer rating\mathrm{rating} (−5000≤rating≤5000-5000 \leq \mathrm{rating} \leq 5000).

输入的第一行包含一个整数 tt(1≤t≤1041 \leq t \leq 10^4)—— 表示测试用例的数量。

每个测试用例的描述由一行组成,该行包含一个整数 rating\mathrm{rating}(−5000≤rating≤5000-5000 \leq \mathrm{rating} \leq 5000)。

输出格式

For each test case, output a single line containing the correct division in the format "Division X", where XX is an integer between 11 and 44 representing the division for the corresponding rating.

对于每个测试用例,输出一行,格式为“Division X”,其中 XX 是一个介于 11 到 44 之间的整数,表示对应评分所在的组别。

输入输出样例

  • 输入#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−41-4, the corresponding ratings are −789-789, 12991299, 13001300, 13991399, so all of them are in division 44.

For the fifth test case, the corresponding rating is 14001400, so it is in division 33.

For the sixth test case, the corresponding rating is 16791679, so it is in division 22.

For the seventh test case, the corresponding rating is 23002300, so it is in division 11.

对于测试用例 11-44,对应的评分为 −789-789、12991299、13001300、13991399,因此它们全部属于第 44 分区。

对于第五个测试用例,对应的评分为 14001400,因此它属于第 33 分区。

对于第六个测试用例,对应的评分为 16791679,因此它属于第 22 分区。

对于第七个测试用例,对应的评分为 23002300,因此它属于第 11 分区。

输入解题思路,AI测评打分。不知道怎么写?

首页