problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p02612
s061858307
Accepted
N = int(input()) print((1000-(N%1000))%1000)
p02612
s108539502
Accepted
N = int(input()) left = N % 1000 if left == 0: print(0) else: print(1000 - left)
p02612
s110930078
Accepted
N=int(input()) if N<=1000: print(1000-N) if 2000>=N>1000: print(2000-N) if 3000>=N>2000: print(3000-N) if 4000>=N>3000: print(4000-N) if 5000>=N>4000: print(5000-N) if 6000>=N>5000: print(6000-N) if 7000>=N>6000: print(7000-N) if 8000>=N>7000: print(8000-N) if 9000>=N>8000: print(9000-N) if 10000>=N>=9000: print(10000-N)
p02612
s064201814
Accepted
n = int(input()) m = 1000 while m < n: m = m + 1000 print(m-n)
p02612
s463540118
Accepted
n = int(input()) c = n % 1000 if c == 0: s = 0 else: s = 1000 - c print(s)
p02612
s887326730
Accepted
n = int(input()) if 0<= n <=1000: print(1000- n) elif 1000< n <=2000: print(2000- n) elif 2000< n <=3000: print(3000- n) elif 3000< n <=4000: print(4000- n) elif 4000< n <=5000: print(5000- n) elif 5000< n <=6000: print(6000- n) elif 6000< n <=7000: print(7000- n) elif 7000< n <=8000: print(8000- n) elif 8000< n <=9000: print(9000- n) elif 1000< n <=10000: print(10000- n)
p02612
s775478460
Accepted
import sys def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) N = I() N %= 1000 if N==0: print(0) else: print(1000-N)
p02612
s562772174
Accepted
n,x=int(input()),1000 a=n%x print(x-a if a else 0)
p02612
s458050428
Accepted
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines def main(): N = int(readline()) pay = (N + 1000 - 1) // 1000 * 1000 ans = pay - N print(ans) if __name__ == "__main__": main()
p02612
s963576284
Accepted
N = int(input()) M = (N+999)//1000 print(M*1000-N)
p02612
s845774709
Accepted
N = int(input()) print((10000-N)%1000)
p02612
s217521392
Accepted
a = int(input()) b = a % 1000 if b != 0: ans = 1000 - b else: ans = b print(ans)
p02612
s440372611
Accepted
ans = int(input()) % 1000 if ans == 0: print(0) exit(0) print(1000 - ans)
p02612
s125293830
Accepted
n = int(input()) if n <= 1000: print(1000-n) elif 1000< n <=2000: print(2000-n) elif 2000< n <=3000: print(3000-n) elif 3000< n <=4000: print(4000-n) elif 4000< n <=5000: print(5000-n) elif 5000< n <=6000: print(6000-n) elif 6000< n <=7000: print(7000-n) elif 7000< n <=8000: print(8000-n) elif 8000< n <=9000: print(9000-n) elif 9000< n <=10000: print(10000-n)
p02612
s008918902
Accepted
N=int(input()) ans=N%1000 ans=1000-ans ans=ans%1000 print(ans)
p02612
s511946553
Accepted
import math n = int(input()) print( math.ceil(n/1000)*1000-n)
p02612
s957234318
Accepted
N = int(input()) p= N%1000 if p==0: print(0) else: print(1000-p)
p02612
s824853470
Accepted
N=int(input())%1000 if N==0: print(0) else: print(1000-N)
p02612
s427155414
Accepted
m = int(input()) mod = m % 1000 if mod == 0: print(0) else: print(1000 - mod)
p02612
s205137144
Accepted
N = int(input()) print(f"{-N % 1000}")
p02612
s498070959
Accepted
N = int(input()) if N % 1000 == 0: print("0") elif N < 1000: print(1000-N) else: n = list(str(N)) print(1000*(1+int(n[0]))-N)
p02612
s177896120
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000-n%1000)
p02612
s658301205
Accepted
N = int(input()) if N == 0 or N%1000 == 0: print('0') else: print(1000 - N%1000)
p02612
s235252228
Accepted
n = int(input()) n %= 1000 if n == 0: print(0) else: print(1000 - n)
p02612
s911243778
Accepted
N = int(input()) print(0 if N%1000 == 0 else 1000-(N%1000))
p02612
s484393189
Accepted
print((1000-int(input())%1000)%1000)
p02612
s582727937
Accepted
N = int(input()) n = N//1000 if n * 1000 != N: n += 1 print(1000*(n)-N)
p02612
s555182792
Accepted
n = int(input()) if n%1000 == 0: print(0) else: print(1000-n%1000)
p02612
s867197956
Accepted
n = int(input()) a = n % 1000 if a == 0: print(0) else: print(1000 - a)
p02612
s992581052
Accepted
#!/usr/bin/env python3 def main(): N = int(input()) if N%1000 == 0: ans = 0 else: ans = 1000 - N % 1000 print(ans) if __name__ == "__main__": main()
p02612
s660457231
Accepted
n = int(input()) i = 0 while i*1000<n: i += 1 print((i)*1000-n)
p02612
s157879330
Accepted
n = int(input()) a = n % 1000 if a == 0: print(0) else: print(1000 - a)
p02612
s255545912
Accepted
n = int(input()) for i in range(1,100): if i*1000 >= n: print(i*1000-n) break
p02612
s037243950
Accepted
N = int(input()) print((1000 - N%1000) % 1000)
p02612
s580220300
Accepted
N = int(input()) if 1000 - N % 1000 == 1000: print(0) else: print(1000 - N % 1000)
p02612
s143032991
Accepted
N=int(input()) if N%1000>0: print(1000-N%1000) else: print(0)
p02612
s260665621
Accepted
n = int(input()) if n%1000==0: print(0) else: print(1000-n%1000)
p02612
s570943168
Accepted
N = int(input()) mod = N % 1000 if mod == 0: print(0) else: print(1000 - N % 1000)
p02612
s773271888
Accepted
N = int(input()) if N%1000 == 0: print(0) else: print(1000-(N%1000))
p02612
s419111215
Accepted
#!/usr/bin/python3 n = int(input()) if(n%1000==0): print("0") else: ans = n%1000 print(1000-ans)
p02612
s654917044
Accepted
a=input() b=int(a[-3:]) if b==0: ans=0 else: ans=1000-b print(ans)
p02612
s255769125
Accepted
n=int(input()) if n%1000:print(1000-(n%1000)) else:print(0)
p02612
s253878942
Accepted
N = int(input()) if N%1000 == 0: print(0) else: print(1000-N%1000)
p02612
s608348800
Accepted
import math N = int(input()) x = math.ceil(N/1000) * 1000 print(x-N)
p02612
s764578240
Accepted
n=int(input()) print(1000-((n-1)%1000)-1)
p02612
s854526953
Accepted
n = int(input()) if n %1000 == 0: print(0) else: print(1000-n%1000)
p02612
s261018842
Accepted
n = int(input()) if((n%1000) == 0): ans = 0 else: ans = 1000-(n%1000) print(ans)
p02612
s257238593
Accepted
n = int(input()) % 1000 print(1000 - n if n else 0)
p02612
s410224176
Accepted
n = int(input()) n = n % 1000 if 1000 - n == 1000: print(0) else: print(1000 - n)
p02612
s204611706
Accepted
N = int(input()) ans = N%1000 if ans == 0: print(0) else: print(1000-ans)
p02612
s511807290
Accepted
# -*- coding: utf-8 -*- N, = map(int, input().split()) if N%1000==0: print(0) else: print(1000-(N%1000))
p02612
s263236826
Accepted
num = int(input()) if num % 1000 == 0: print(0) else: t = num // 1000 t += 1 print(t * 1000 - num)
p02612
s069664868
Accepted
N = int(input()) if N%1000==0: print(0) else: print(1000-(N%1000))
p02612
s069769386
Accepted
N = int(input()) for i in range(1,100): if i*1000 >= N: print((i*1000)-N) break
p02612
s766138142
Accepted
n=int(input()) if n%1000==0: print(0) else: print(1000-n%1000)
p02612
s402101335
Accepted
n=int(input()) res=0 cont=1 while n>0: n=n-(1000*cont) print(abs(n))
p02612
s166743774
Accepted
N=int(input()) print(0 if N%1000==0 else 1000-N%1000)
p02612
s110175271
Accepted
n=int(input()) if n%1000==0: print("0") else: z=n//1000 print((z+1)*1000-n)
p02612
s210356473
Accepted
x = int(input()) if x % 1000 == 0: print(x%1000) else: print((x//1000+1)*1000-x)
p02612
s832807788
Accepted
N=int(input()) if N%1000: print(1000-N%1000) else: print(0)
p02612
s425675828
Accepted
n=int(input());print(1000-n%1000 if n%1000!=0 else 0)
p02612
s832001166
Accepted
N=int(input()) if N%1000==0: print(0) else: ans =1000-(N%1000) print(int(ans))
p02612
s381785022
Accepted
N = int(input()) if(N%1000 == 0): print(0) else : print(1000 - N%1000)
p02612
s044292803
Accepted
import math n = int(input()) print(1000 * (math.ceil(n / 1000)) - n)
p02612
s501675791
Accepted
a = int(input()) b = (1000-a%1000)%1000 print(b)
p02612
s849212202
Accepted
import math n = int(input()) x = math.ceil(n/1000) print(x*1000-n)
p02612
s234962382
Accepted
N = input() N = int(N) print(-N%1000)
p02612
s704818940
Accepted
n=int(input()) if n%1000!=0: print(1000-n%1000) else: print(0)
p02612
s775256261
Accepted
n = int(input()) if n%1000 > 0: print(1000-n%1000) else: print(0)
p02612
s171166102
Accepted
N = int(input()) A = N % 1000 if A == 0: print(0) else: print(1000-A)
p02612
s644270038
Accepted
n = int(input()) if n%1000 == 0: change = 0 else: change = (1000*(n//1000 + 1)) - n print(change)
p02612
s692611149
Accepted
d = int(input()) if d % 1000 == 0: print(0) else: print(1000 - d % 1000)
p02612
s861120320
Accepted
N = int(input()) if N/1000 == N//1000: pay = N//1000 * 1000 else: pay = (N//1000+1)*1000 print(pay-N)
p02612
s520284270
Accepted
n=int(input()) while(n>0): n-=1000 print(abs(n))
p02612
s167050207
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - n % 1000)
p02612
s739392293
Accepted
n = int(input()) i = 0 while 1: if i*1000 >= n: print(i*1000-n) break else: i += 1
p02612
s137020573
Accepted
n = int(input()) amari = n % 1000 if amari == 0: print(0) else: print(1000 - n % 1000)
p02612
s726724411
Accepted
n = int(input()) x = n//1000 if n % 1000: x += 1 print(1000*x - n)
p02612
s201520290
Accepted
N = int(input()) print((1000 - N) % 1000)
p02612
s682710599
Accepted
#!/usr/bin/python # -*- Coding: utf-8 -*- n = int(input()) if n % 1000 == 0: print(0) elif n > 1000: a = (n//1000 + 1)*1000 print(a - n) else: print(1000 - n)
p02612
s960123001
Accepted
n = int(input()) a = (n-1)//1000 print((a+1)*1000-n)
p02612
s473166048
Accepted
# -*- coding: utf-8 -*- n = int(input()) print((1000-n%1000)%1000)
p02612
s045856377
Accepted
import math n = int(input()) time = math.ceil(n / 1000) ans = (time * 1000) - n if ans <= 0: print(0) else: print(ans)
p02612
s787750775
Accepted
N = int(input()) rem = N%1000 if rem == 0: print(0) else: print(1000 - N%1000)
p02612
s373323989
Accepted
n = input() num = int(n[-3:]) if num ==0: num = 1000 print(1000-num)
p02612
s246610084
Accepted
# Begin Header {{{ from math import gcd from collections import Counter, deque, defaultdict from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort from itertools import accumulate, product, permutations, combinations, combinations_with_replacement # }}} End Header # _________コーディングはここから!!___________ n = int(input()) if n%1000 == 0: print(0) else: print(1000-n%1000)
p02612
s095994736
Accepted
N = int(input()) ans = N%1000 if ans != 0: ans = abs(1000-ans) print(ans)
p02612
s367439546
Accepted
n = int(input()) if (n%1000) != 0: print(1000-(n%1000)) else: print(0)
p02612
s683949996
Accepted
N = int(input()) count = int((N-1)/1000) + 1 print(1000*count-N)
p02612
s762028107
Accepted
N = int(input()) print(0 if N % 1000 == 0 else 1000 - N % 1000)
p02612
s011655526
Accepted
n=int(input()) if n%1000 == 0:print(0) else:print(1000-(n%1000))
p02612
s207727581
Accepted
str = input() int = int(str[-3:]) if(int == 0): print(0) else: print(1000-int)
p02612
s730524835
Accepted
N = int(input()) ans = 1000-(N%1000) if ans != 1000: print(ans) else: print(0)
p02612
s961990591
Accepted
N = int(input()) money = 0 while money < N: money += 1000 print(money - N)
p02612
s168215153
Accepted
print(-int(input())%1000)
p02612
s725620983
Accepted
n = int(input()) if n%1000 == 0: print(0) else: print(1000-n%1000)
p02612
s055042412
Accepted
N = int(input()) if N%1000==0: print(0) else: print(1000-N%1000)
p02612
s148537856
Accepted
n = int(input()) if n % 1000 == 0: print(0) exit() print((n//1000+1) * 1000 - n)
p02612
s424701491
Accepted
x = int(input()) % 1000 if x == 0: print(0) else: print(1000 - x)
p02612
s447270533
Accepted
n = int(input()) count = (n // 1000) money = count * 1000 if money < n: print((count+1) * 1000 -n) else: print((count) * 1000 -n)