Submission #58310130


Source Code Expand

N = int(input())
#自分が払った金額
now = 0
#自分が払った金額が払うべき金額以上になるまで
#つまり、自分が払った金額が払うべき金額未満である間
while now < N:
  now += 1000
#おつりが発生する
#おつり = 払った金額 - 払うべき金額
ans = now - N
#答えを出力する
print(ans)

Submission Info

Submission Time
Task A - Payment
User blueberry1001
Language Python (CPython 3.11.4)
Score 100
Code Size 359 Byte
Status AC
Exec Time 10 ms
Memory 8612 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 17
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt AC 9 ms 8532 KiB
hand_02.txt AC 9 ms 8476 KiB
hand_03.txt AC 9 ms 8536 KiB
hand_04.txt AC 9 ms 8512 KiB
hand_05.txt AC 9 ms 8552 KiB
random_01.txt AC 9 ms 8612 KiB
random_02.txt AC 10 ms 8484 KiB
random_03.txt AC 9 ms 8548 KiB
random_04.txt AC 9 ms 8508 KiB
random_05.txt AC 9 ms 8532 KiB
random_06.txt AC 9 ms 8572 KiB
random_07.txt AC 10 ms 8440 KiB
random_08.txt AC 10 ms 8536 KiB
random_09.txt AC 10 ms 8460 KiB
random_10.txt AC 10 ms 8492 KiB
sample_01.txt AC 9 ms 8472 KiB
sample_02.txt AC 10 ms 8472 KiB