Submission #61474899


Source Code Expand

"""
<方針>
- 九九の値 `num` を順番に見ていく.
- それが `X` と合致しなければ,答えに足す.
"""
# 入力
X = int(input())

# 総和
ans = 0

# 九九をみる
for i in range(1, 10):
  for j in range(1, 10):
    # 九九の値を取得
    num = i*j
    # Xに一致しなければ
    if(num!=X):
      # 総和に足す
      ans += num

# 出力
print(ans)

Submission Info

Submission Time
Task B - 9x9 Sum
User mattsunkun
Language Python (PyPy 3.10-v7.3.12)
Score 150
Code Size 412 Byte
Status AC
Exec Time 59 ms
Memory 76800 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 3
AC × 14
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_00.txt, 01_random_01.txt, 01_random_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
Case Name Status Exec Time Memory
00_sample_00.txt AC 58 ms 76788 KiB
00_sample_01.txt AC 57 ms 76468 KiB
00_sample_02.txt AC 57 ms 76612 KiB
01_random_00.txt AC 59 ms 76620 KiB
01_random_01.txt AC 57 ms 76800 KiB
01_random_02.txt AC 57 ms 76428 KiB
01_random_03.txt AC 56 ms 76604 KiB
01_random_04.txt AC 57 ms 76384 KiB
01_random_05.txt AC 57 ms 76468 KiB
01_random_06.txt AC 56 ms 76500 KiB
01_random_07.txt AC 56 ms 76444 KiB
01_random_08.txt AC 57 ms 76324 KiB
01_random_09.txt AC 57 ms 76472 KiB
01_random_10.txt AC 57 ms 76416 KiB