problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p02612
s413322987
Accepted
number = int(input()) if (number % 1000) == 0: print(0) else: print(1000 - number % 1000)
p02612
s218471588
Accepted
n = int(input()) if(n%1000 !=0): print(abs(n%1000 - 1000)) else:print(0)
p02612
s073851108
Accepted
N = int(input()) if N%1000==0: q = N//1000-1 else: q = N//1000 ans = 1000*(q+1)-N print(ans)
p02612
s971999306
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print(1000 - (N % 1000) )
p02612
s204621105
Accepted
n=int(input()) if n%1000==0: print(0) else: print(1000-n%1000)
p02612
s650399444
Accepted
n=int(input()) if n%1000==0: ans=0 else: ans=1000-n%1000 print(ans)
p02612
s074228911
Accepted
num = int(input()) val = num % 1000 if val == 0: print(0) else: print(1000 - val)
p02612
s596435616
Accepted
n = int(input()) if n % 1000 != 0 : print(1000 - (n % 1000)) else : print(0)
p02612
s685845974
Accepted
N = int(input()) for i in range(0,10001,1000): if (i-N) > 0: print(i-N) break elif i == N: print(0) break else: pass
p02612
s487541931
Accepted
n = int(input()) if n % 1000 == 0: x = n / 1000 else: x = n // 1000 + 1 print(int(1000 * x - n))
p02612
s357428127
Accepted
N = int(input()) print((1000- N%1000)%1000)
p02612
s993040231
Accepted
n = int(input()) for i in range(1000, 10001, 1000): if i >= n: print(i-n) exit()
p02612
s661321424
Accepted
def resolve(): import sys input = sys.stdin.readline # 整数 1 つ n = int(input()) # 整数複数個 # a, b = map(int, input().split()) # 整数 N 個 (改行区切り) # N = [int(input()) for i in range(N)] # 整数 N 個 (スペース区切り) # N = list(map(int, input().split())) # 整数 (縦 H 横 W の行列) # A = [list(map(int, input().split())) for i in range(H)] import math print(math.ceil(n/1000)*1000-n) resolve()
p02612
s140337050
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - n % 1000)
p02612
s769866444
Accepted
N = int(input()) print(1000*((N-1)//1000 + 1) - N)
p02612
s941314232
Accepted
n = int(input()) if n%1000 == 0: print(0) else: print(1000-n%1000)
p02612
s882380404
Accepted
import math cost=int(input()) payment=math.ceil(cost/1000)*1000 print(payment-cost)
p02612
s346293570
Accepted
print((1000-int(input()))%1000)
p02612
s386734125
Accepted
N = int(input()) if N%1000==0: A = 0 else: A =1000-( N % 1000) print(int(A))
p02612
s217801468
Accepted
a=int(input()) b=a%1000 if b==0: print(0) else: print(1000-b)
p02612
s081447443
Accepted
from collections import defaultdict,deque from sys import stdin,setrecursionlimit import heapq,bisect,math,itertools,string,queue,copy setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inpl(): return list(map(int, stdin.readline().split())) N = int(input()) if N%1000==0: print(0) else: a = int(N/1000) + 1 print(a*1000 - N)
p02612
s259264906
Accepted
n = int(input()) print(1000 - n % 1000 if n % 1000 != 0 else 0)
p02612
s826378272
Accepted
N = int(input()) i = 1 while 1000 * i < N: i += 1 print(1000 * i - N)
p02612
s880523848
Accepted
N=int(input()) x=1000-N%1000 if x==1000: print(0) else: print(x)
p02612
s386799026
Accepted
def main(): n = int(input()) print(0 if n % 1000 == 0 else 1000 - (n % 1000)) if __name__ == '__main__': main()
p02612
s003602833
Accepted
print(-int(input())%1000)
p02612
s064140398
Accepted
N = int(input()) for i in range(100): if 1000 * i >= N: break print(1000 * i - N)
p02612
s698237727
Accepted
from sys import stdin, stdout int_in = lambda: int(stdin.readline()) arr_in = lambda: [int(x) for x in stdin.readline().split()] mat_in = lambda rows: [arr_in() for _ in range(rows)] str_in = lambda: stdin.readline().strip() out = lambda o: stdout.write("{}\n".format(o)) arr_out = lambda o: out(" ".join(map(str, o))) bool_out = lambda o: out("YES" if o else "NO") tests = lambda: range(1, int_in() + 1) case_out = lambda i, o: out("Case #{}: {}".format(i, o)) if __name__ == "__main__": n = int_in() n %= 1000 n = n if n == 0 else 1000 - n out(n)
p02612
s110899024
Accepted
n = int(input()) res = 1000-(n%1000) print(res%1000)
p02612
s769274097
Accepted
#import #=input() n=int(input()) #=map(int,input().split()) #=list(map(int,input().split())) #=[list(map(int,input().split())) for _ in range()] if n%1000 != 0: print(1000-n%1000) else: print(0)
p02612
s339762539
Accepted
n = int(input()) o = n + 1000 #1500 o = o // 1000 #1 o = o * 1000 #1000 if n % 1000 == 0: print(o - n -1000) else: print(o - n)
p02612
s630147558
Accepted
import math n=int(input()) print(math.ceil(n/1000)*1000-n)
p02612
s408038446
Accepted
print(-int(input())%1000)
p02612
s385118463
Accepted
n = int(input()) if n > 0: if n % 1000 == 0: print(0) else: print(int(1000 - (n%1000)))
p02612
s310695644
Accepted
N = int(input()) th = N % 1000 if th != 0: ans = 1000 - th print(ans) else: print("0")
p02612
s188274352
Accepted
n = int(input()) if n%1000 == 0: print(0) else: print(1000-n%1000)
p02612
s765391903
Accepted
n = int(input()) if n%1000 == 0: ans = 0 else: ans = 1000 - n%1000 print(ans)
p02612
s449371269
Accepted
N = int(input()) if N%1000 == 0: print(0) else: print(1000*(N//1000 + 1) - N)
p02612
s490196171
Accepted
print(-int(input())%1000)
p02612
s619216822
Accepted
N=int(input()) N%=1000 if N>0: print(1000-N) else: print(0)
p02612
s656302215
Accepted
a = int(input()) count = 0 for i in range(1,1000000000): if 1000 * i - a < 0: count += 1 else: 1000 *i - a >= 0 print(int(1000 * i - a)) break
p02612
s644516983
Accepted
n = int(input()) r = n while (True): if r <= 1000: break r = r - 1000 if r == 0: print(0) else: print(1000 - r)
p02612
s515984454
Accepted
import sys read = sys.stdin.read readline = sys.stdin.buffer.readline sys.setrecursionlimit(10 ** 8) INF = float('inf') MOD = 10 ** 9 + 7 def main(): N = int(readline()) ans = 1000-N%1000 if ans ==1000: print(0) else: print(ans) if __name__ == '__main__': main()
p02612
s822673882
Accepted
N = int(input()) n = N//1000 if n*1000 == N: print(0) else: print((n+1)*1000-N)
p02612
s051277290
Accepted
N=int(input()) A=((N+1000-1)//1000)*1000-N print(A)
p02612
s518925577
Accepted
n = int(input()) ans = (1000 - (n % 1000)) % 1000 print(ans)
p02612
s551767964
Accepted
n = int(input()) while n >= 1000: n -= 1000 if n == 0: print(n) else: print(1000 - n)
p02612
s643017798
Accepted
N = int(input()) if N%1000 == 0: print(0) else: print(1000 - N%1000)
p02612
s269824646
Accepted
money=int(input()) i=0 while i<=money: if i*1000>=money: break else: i+=1 print(i*1000-money)
p02612
s256520123
Accepted
N = int(input()) while( N > 0 ): N -= 1000 print(-N)
p02612
s065933858
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print(1000-N % 1000)
p02612
s085135897
Accepted
n = int(input()) if n%1000 == 0: print(0) else: print(1000-n%1000)
p02612
s446237322
Accepted
n = int(input()) if n % 1000 != 0: print(1000-n%1000) else: print(0)
p02612
s800105174
Accepted
N=int(input()) if N%1000>0: print(1000-N%1000) else: print(0)
p02612
s490997748
Accepted
import math N = int(input()) q = N / 10**3 pay = math.ceil(q) * 10**3 print(pay - N)
p02612
s978664552
Accepted
def resolve(): N = int(input()) print(((N+999)//1000)*1000-N) resolve()
p02612
s262193740
Accepted
n = int(input()) n %= 1000 print((1000-n)%1000)
p02612
s884136341
Accepted
# coding: utf-8 # Your code here! price=int(input()) if(price%1000==0): change=0 else: for i in range(11): change=1000*i-price if(change>0): break print(change)
p02612
s396597082
Accepted
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**7) from pprint import pprint as pp from pprint import pformat as pf # @pysnooper.snoop() #import pysnooper # debug import math #from sortedcontainers import SortedList, SortedDict, SortedSet # no in atcoder import bisect if __name__ == '__main__': n = int(input()) tmp = n % 1000 ans = 1000 - tmp if ans == 1000: ans = 0 #print('ans') # debug print(ans) #print('\33[32m' + 'end' + '\033[0m') # debug
p02612
s247289778
Accepted
n = int(input()) result = n % 1000 print(0 if result == 0 else 1000 - result)
p02612
s778505184
Accepted
n = int(input()) cnt = 0 if n % 1000 > 0: cnt = int((n / 1000) + 1) else: cnt = n / 1000 print(int(cnt*1000 - n))
p02612
s545341174
Accepted
import math n = int(input()) print(math.ceil(n / 1000) * 1000 - n)
p02612
s228579680
Accepted
N=int(input()) if N%1000==0: print(0) else: maisu=(N//1000)+1 print(-N+1000*maisu)
p02612
s062779630
Accepted
import math n = int(input()) thousand = math.ceil(n / 1000) change = thousand*1000 - n print(change)
p02612
s260496376
Accepted
n = int(input()) while n > 1000: n -= 1000 print(1000 - n)
p02612
s400907789
Accepted
n=int(input())%1000 print(0 if n==0 else 1000-n)
p02612
s729117523
Accepted
n = int(input()) print(-n%1000)
p02612
s120133345
Accepted
import math N = int(input()) x = math.ceil(N/1000) print(x*1000-N)
p02612
s421538728
Accepted
n = int(input()) print(0 if n % 1000 == 0 else 1000 - n % 1000)
p02612
s853492809
Accepted
print( (1000 - int(input()) % 1000 ) % 1000 )
p02612
s541157466
Accepted
n = int(input()) m = -(-n//1000) print(1000*m-n)
p02612
s466488929
Accepted
import math N = int(input()) T = math.ceil(N/1000) print(1000*T-N)
p02612
s334503344
Accepted
N = int(input()) % 1000 if N == 0: print(0) else: print(1000-N)
p02612
s769853823
Accepted
# coding: utf-8 # Your code here! n = int(input()) while True: if n <= 1000: ans = 1000 - n break n -= 1000 print(ans)
p02612
s005439171
Accepted
N=int(input()) if N%1000==0: print(0) else: print(1000 - N%1000)
p02612
s392177047
Accepted
n=int(input()) if n%1000==0: print(0) exit() print((n//1000+1)*1000-n)
p02612
s436878405
Accepted
n = int(input()) l = [1000,2000,3000,4000,5000,6000,7000,8000,9000,10000] for i in l: if n <= i: r = i break result = r - n print(result)
p02612
s353075892
Accepted
N = int(input()) if N%1000 == 0: print (0) else: print(1000 - N%1000)
p02612
s404490741
Accepted
n = int(input()) if n % 1000 != 0: print(1000 - n % 1000) else: print(0)
p02612
s342350193
Accepted
import math N = int(input()) M = math.ceil(N/1000) print(M*1000-N)
p02612
s001998207
Accepted
n = int(input()) ans = 0 for i in range(11): if i*1000 - n < 1000: ans = i*1000 - n elif i*1000 - n > 1000: i += 1 print(ans)
p02612
s604488668
Accepted
N = int(input()) print((1000 - N) % 1000)
p02612
s788310158
Accepted
print(-int(input())%1000)
p02612
s441570291
Accepted
N = int(input()) if N%1000 == 0: print(0) else: print(1000-N%1000)
p02612
s472378816
Accepted
N = int(input()) o = (1000-N%1000)%1000 print(o)
p02612
s152681563
Accepted
print(1000 - amari if (amari:=int(input())%1000) else 0)
p02612
s344736081
Accepted
n = int(input()) print((1000 - n) % 1000)
p02612
s233825155
Accepted
n=int(input())%1000 if n == 0: print(0) else: print(1000-n)
p02612
s831244194
Accepted
import sys def input(): return sys.stdin.readline()[:-1] n = int(input()) if n%1000==0: print(0) else: print(1000-n%1000)
p02612
s097526879
Accepted
n = int(input()) keta = int(n/1000) #print(keta) if(n%1000==0): print(0) else: print((keta+1)*1000-n)
p02612
s221886686
Accepted
import sys input = sys.stdin.readline def log(*args): print(*args, file=sys.stderr) def main(): n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - n % 1000) if __name__ == '__main__': main()
p02612
s432767863
Accepted
a = int(input()) if a % 1000 == 0: print("0") quit() while a > 1000: a -= 1000 if a < 1000: break print(1000-a)
p02612
s609844441
Accepted
import sys import math import bisect def main(): n = int(input()) ans = (1000 - n % 1000) % 1000 print(ans) if __name__ == "__main__": main()
p02612
s231608657
Accepted
n = int(input()) if n % 1000 == 0: y = 0 else: y = 1000 - n % 1000 print(y)
p02612
s990923922
Accepted
n = int(input()) k = 0--n//1000 print(k*1000-n)
p02612
s116334419
Accepted
n = int(input()) while True: if n <= 1000: print(1000-n) exit() n -= 1000
p02612
s483487037
Accepted
n=int(input()) for i in range(12): if 1000*i - n >= 0: print(1000*i-n) exit()
p02612
s809230551
Accepted
print((1000-int(input())%1000)%1000)
p02612
s582832031
Accepted
n=int(input()) print((10000-n)%1000)
p02612
s257525448
Accepted
N = int(input()) M = (N+1000-1)//1000 ans = M*1000-N print(ans)