Submission #60822843


Source Code Expand

"""
<方針>
- 毎回レーティングを正しく変動させれば良さそう.
- `for` 文の中で,ダイナミックに入力受け取ってみる.
- `match` 文で条件分岐をしているが,`if` 文でも全然問題ない
"""
# 入力
N, R = map(int, input().split())

# レート変動
for _ in range(N):
  # 入力をダイナミックに受け取る
  D, A = map(int, input().split())
  # divisionで分岐
  match D:
    case 1:
      # レーティング対象のとき
      if (1600 <= R <= 2799):
        R += A
    case 2:
      # レーティング対象のとき
      if (1200 <= R <= 2399):
        R += A

# 出力
print(R)

Submission Info

Submission Time
Task B - ARC Division
User mattsunkun
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 682 Byte
Status AC
Exec Time 63 ms
Memory 76628 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 19
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 02_handmade_15.txt, 02_handmade_16.txt, 02_handmade_17.txt, 02_handmade_18.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 61 ms 76352 KiB
00_sample_01.txt AC 61 ms 76264 KiB
00_sample_02.txt AC 61 ms 76220 KiB
01_random_03.txt AC 62 ms 76152 KiB
01_random_04.txt AC 62 ms 76220 KiB
01_random_05.txt AC 63 ms 76344 KiB
01_random_06.txt AC 63 ms 76172 KiB
01_random_07.txt AC 63 ms 76460 KiB
01_random_08.txt AC 61 ms 76240 KiB
01_random_09.txt AC 61 ms 76424 KiB
01_random_10.txt AC 61 ms 76628 KiB
01_random_11.txt AC 61 ms 76336 KiB
01_random_12.txt AC 61 ms 76336 KiB
01_random_13.txt AC 63 ms 76248 KiB
01_random_14.txt AC 61 ms 76300 KiB
02_handmade_15.txt AC 61 ms 76472 KiB
02_handmade_16.txt AC 61 ms 76320 KiB
02_handmade_17.txt AC 60 ms 76332 KiB
02_handmade_18.txt AC 61 ms 76468 KiB