problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p02612
s653433158
Accepted
n=int(input()) i=0 N=n while n>0: n-=1000 i+=1 print(i*1000-N)
p02612
s525372072
Accepted
n = int(input()) c = n % 1000 if c == 0: print(0) else: print(1000 - c)
p02612
s627365749
Accepted
N=int(input()) ma=-(-N//1000) NN=ma*1000-N print(NN)
p02612
s601872682
Accepted
n = int(input()) x = n % 1000 if x == 0: print(0) else: print(1000-x)
p02612
s873473412
Accepted
N = int(input()) if (N % 1000) == 0: ans = 0 else: ans = 1000 - (N % 1000) print(ans)
p02612
s380493480
Accepted
n = int(input()) if n%1000: bills = n//1000 + 1 else: bills = n//1000 ans = bills * 1000 - n print(ans)
p02612
s214163239
Accepted
def actual(N): if N % 1000 == 0: return 0 return (N // 1000 + 1) * 1000 - N N = int(input()) print(actual(N))
p02612
s435765496
Accepted
n = int(input()) print((-n)%1000)
p02612
s874746733
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - (n % 1000))
p02612
s961426597
Accepted
N = int(input()) r = N % 1000 print(0 if r == 0 else 1000 - r)
p02612
s175697841
Accepted
def main(): N = int(input()) o = (N % 1000) ans = 0 if o == 0 else 1000 - o print(ans) return main()
p02612
s036367255
Accepted
import math n = int(input()) ans = math.ceil(n / 1000) * 1000 - n print(ans)
p02612
s719398167
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print(1000 - N % 1000)
p02612
s596623363
Accepted
import math N = int(input()) print(math.ceil(N / 1000) * 1000 - N)
p02612
s491243824
Accepted
n=int(input()) print((1000-n%1000)%1000)
p02612
s706871604
Accepted
N= int(input()) S=N%1000 if S !=0: print(abs(S-1000)) else: print(0)
p02612
s042226217
Accepted
n=int(input()) ans=n%1000 if(ans==0): print(ans) else: print(1000-ans)
p02612
s458785090
Accepted
N = int(input()) print((1000 - N % 1000)%1000)
p02612
s378595043
Accepted
n = int(input()) ans = 1000-n%1000 if ans == 1000: ans = 0 print(ans)
p02612
s439149919
Accepted
#abc173a n=int(input()) if n%1000==0: print(0) exit() print(1000-n%1000)
p02612
s993221214
Accepted
N=int(input()) 1<=N<=10000 if((N%1000)==0): print("0") else: print(1000-(N%1000))
p02612
s102964809
Accepted
cost = input() amari = int(cost[-3:]) if amari == 0: amari = 1000 print(1000 - amari)
p02612
s333967203
Accepted
n = int(input()) pay = 1000 while pay - n < 0: pay += 1000 print(pay - n)
p02612
s932331581
Accepted
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines from math import ceil #import numpy as np def main(): n = int(input()) r = ceil(n / 1000) * 1000 - n print(r) if __name__ == '__main__': main()
p02612
s287288926
Accepted
n = int(input()) x = 0 while True: if n % 1000 == 0: break n += 1 x += 1 print(x)
p02612
s907643450
Accepted
N=int(input()) if N%1000==0: print(0) else: print(1000-N%1000)
p02612
s471336155
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print((N // 1000 + 1) * 1000 - N)
p02612
s383749306
Accepted
from math import ceil a = int(input()) print((ceil(a / 1000) * 1000) - a)
p02612
s906714694
Accepted
N=int(input()) if N%1000==0: print(0) else: print(1000-N%1000)
p02612
s953662143
Accepted
import math import collections import bisect from copy import copy def main(): N = int(input()) print((1000 - N % 1000) % 1000) if __name__ == '__main__': main()
p02612
s877169618
Accepted
N = int(input()) under1000 = N % 1000 if under1000 == 0: print(0) else: print(1000 - under1000)
p02612
s822011055
Accepted
n = int(input()) a = n%1000 if a == 0: print(0) else: print(1000-a)
p02612
s422484134
Accepted
n = int(input()) b = 0 while b < n: b += 1000 print(b-n)
p02612
s010921245
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: payment = N // 1000 + 1 change = payment*1000 - N print(change)
p02612
s481229443
Accepted
N=int(input()) A=1000*(N//1000)-N B=((N//1000)+1)*1000-N if A<=B and A>=0: print(int(A)) else: print(int(B))
p02612
s703248851
Accepted
n=int(input()) money=1000 while True: if money>=n: print(money-n) break money+=1000
p02612
s226297887
Accepted
N = int(input()) M=1000 while True: if N <= M: print(M-N) break else: M += 1000
p02612
s064243069
Accepted
n=int(input()) t=n%1000 if t==0: print(0) else: print(1000-t)
p02612
s903324354
Accepted
n = int(input()) import math x = math.ceil(n/1000)*1000-n print (x)
p02612
s546276265
Accepted
n = int(input()) a=((n//1000)+1)*1000-n if a == 1000: print(0) else: print(a)
p02612
s281743336
Accepted
N = int(input()) ans = 0 for i in range(11): if 1000*i >= N: ans = 1000*i - N break print(ans)
p02612
s134542204
Accepted
import math n = int(input()) round_n = math.ceil(n/1000)*1000 print(round_n-n)
p02612
s189445732
Accepted
n = int(input()) print(999-(n-1)%1000)
p02612
s410206429
Accepted
N = int(input()) if(N%1000 != 0): print(1000-(N%1000)) else:print(0)
p02612
s653298368
Accepted
n=int(input()) if n%1000==0: print(0) else: print(1000-n%1000)
p02612
s726755199
Accepted
from math import ceil n=int(input()) val=ceil(n/1000) print(1000*val-n)
p02612
s017035279
Accepted
N=int(input()) if N%1000==0: print(0) else: print(1000-N%1000)
p02612
s928127819
Accepted
N = int(input()) i = 0 while N > i * 1000: i += 1 ans = i * 1000 - N print(ans)
p02612
s819097477
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 -(n % 1000))
p02612
s271770192
Accepted
N = int(input()) n = N/1000 for i in range(11): if i >= n: print(i*1000-N) break
p02612
s186399658
Accepted
import math N = int(input()) tmp = math.ceil(N / 1000) print(1000*tmp - N)
p02612
s864054488
Accepted
N = int(input()) print(1000 - N % 1000 if N % 1000 != 0 else 0)
p02612
s010934231
Accepted
n=int(input()) if n%1000==0: print(0) else: print(1000-(n%1000))
p02612
s435379422
Accepted
X = int(input()) if X%1000: print(1000 - (X%1000)) else: print(0)
p02612
s346807864
Accepted
N = int(input()) for i in range(10): if (i+1)*1000 >= N: print((i+1)*1000-N) exit()
p02612
s876621423
Accepted
N=int(input()) if N % 1000 == 0: print(0) else: print(1000 - N%1000)
p02612
s477040521
Accepted
n= int(input()) if n%1000==0: print(0) else: print(1000-n%1000)
p02612
s357427473
Accepted
def main(): n = int(input()) print((1000 - n) % 1000) if __name__ == "__main__": main()
p02612
s199234832
Accepted
n = int(input()) print(0 if n % 1000 == 0 else 1000 - (n % 1000))
p02612
s549132428
Accepted
# Payment N = int(input()) print((10000 - N) % 1000)
p02612
s552809792
Accepted
# n, m, l = map(int, input().split()) # list_n = list(map(int, input().split())) # n = input() # list = [input() for i in range(N) # list = [[i for i in range(N)] for _ in range(M)] import sys input = sys.stdin.readline N = int(input()) if N % 1000 != 0: print(1000 - N % 1000) else: print(0)
p02612
s807766791
Accepted
money = int(input()) output = 0 if money <= 1000: output = 1000 - money elif money % 1000 == 0: output = 0 else: output = 1000 - (money % 1000) print(output)
p02612
s299657863
Accepted
n=int(input()) if n%1000==0: print(0) else: x=n//1000 y=x+1 y=y*1000 y=abs(n-y) print(y)
p02612
s802281208
Accepted
print((1000-int(input())%1000)%1000)
p02612
s744478883
Accepted
price=int(input()) ans=price%1000 if ans!=0: ans=1000-ans print(ans)
p02612
s511785917
Accepted
N=int(input()) print((-(-N//1000)*1000)-N)
p02612
s909976664
Accepted
a=int(input()) a%=1000 if a==0: print(0) else: print(1000-a)
p02612
s082614870
Accepted
n = int(input()) n = n%1000 if n==0: print(0) else: print(1000-n)
p02612
s997979471
Accepted
N = int(input()) if N%1000 == 0: print(0) else: print(1000-int(N%1000))
p02612
s108541935
Accepted
n = int(input()) print(-n % 1000)
p02612
s701519311
Accepted
def main(): N = int(input()) money = 0 while N > money: money += 1000 print(money - N) if __name__ == '__main__': main()
p02612
s905586406
Accepted
print((1000-(int(input())%1000))%1000)
p02612
s854872301
Accepted
import sys import heapq, functools, collections import random from collections import Counter, defaultdict # read line as a string # strr = input() # read line as an integer k = int(input()) # read one line and parse each word as a string # lst = input().split() # read one line and parse each word as an integer # arr = list(map(int,input().split())) if k%1000 == 0: print(0) else: print(1000 - k%1000)
p02612
s050425314
Accepted
N=int(input()) R=(1000-N%1000)%1000 print(R)
p02612
s215166916
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - n % 1000)
p02612
s121862549
Accepted
N = int(input()) M = N // 1000 if N % 1000 != 0: M += 1 print(1000 * M - N)
p02612
s133209141
Accepted
n = int(input()) print((1000-n%1000) % 1000)
p02612
s618089869
Accepted
N = int(input()) res = N%1000 if res == 0: print(res) else: print(1000-res)
p02612
s211705301
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - n % 1000)
p02612
s558596018
Accepted
import numpy N = int(input()) a = int(numpy.ceil(N / 1000) * 1000 - N) print(a)
p02612
s561988032
Accepted
a = int(input()) print(1000 - (a % 1000) if a % 1000 != 0 else 0)
p02612
s441971111
Accepted
S = int(input()) pay = 1000 while S > pay: pay += 1000 else: print(pay - S)
p02612
s791728832
Accepted
money = int(input()) ans = 1000 - money % 1000 if int(ans) == 1000: print(0) else: print(int(ans))
p02612
s306789067
Accepted
n = int(input()) m = n%1000 if m ==0: print(0) else : print(1000-m)
p02612
s999461555
Accepted
N = int(input()) x = 0 while x < N: x = x + 1000 output = x - N print(output)
p02612
s420577519
Accepted
def main(): N = int(input()) if N%1000 == 0: print(0) else: print(1000 - (N%1000)) if __name__ == '__main__': main()
p02612
s382026744
Accepted
n=int(input()) if n%1000==0: print(0) else: i=n//1000 print((i+1)*1000-n)
p02612
s075381350
Accepted
n = int(input()) n %= 1000 n = 1000 -n if n % 1000 == 0: n = 0 print(n)
p02612
s190201943
Accepted
n=int(input()) ans=(1000- n%1000)%1000 print(ans)
p02612
s525875556
Accepted
n = int(input()) a = n%1000 if a == 0 : print(a) else: print(1000-a)
p02612
s416545780
Accepted
int = int(input()) print((1000 - int % 1000) % 1000)
p02612
s600133440
Accepted
price = int(input()) if price % 1000 == 0: print(0) else: print(1000-(price%1000))
p02612
s028911206
Accepted
x = int(input()) e=x%1000 r=1000-e if r==1000: print(0) else: print(r)
p02612
s142917281
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print(1000 - N % 1000)
p02612
s653535346
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(((n // 1000 + 1) * 1000) - n)
p02612
s918776101
Accepted
n = int(input()) for i in range(1, 11): if 1000*i-n>=0: print(1000*i-n) break
p02612
s117552433
Accepted
# coding: utf-8 # ζ—₯本θͺžγ‚’ε…₯εŠ›γ§γγ‚‹γ‚ˆγ†γ«γ™γ‚‹γŸγ‚γ«δΈŠθ¨˜δΈ€ζ–‡γŒεΏ…θ¦ N = int(input()) chash = 0 while chash < N: chash += 1000 print(chash - N )
p02612
s001135616
Accepted
print((10000 - int(input())) % 1000)
p02612
s785999440
Accepted
N = int(input()) ans = 1000 - (N%1000) if ans == 1000: print(0) else: print(ans)
p02612
s556596460
Accepted
import math N = int(input()) print(1000*math.ceil(N/1000)-N)