problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p02612
s736041390
Accepted
n = int(input()) if(n%1000==0): print(0) else: print(1000 - (n%1000))
p02612
s854780886
Accepted
N=int(input()) n=N%1000 if n==0: print(n) else: print(1000-n)
p02612
s415352119
Accepted
N = int(input()) k = (N + 999)//1000 print(k*1000 - N)
p02612
s231158058
Accepted
n = int(input()) print((1000 - n % 1000) % 1000)
p02612
s540521421
Accepted
print(-int(input())%1000)
p02612
s649783463
Accepted
N = int(input()) A=int(N/1000)+1 if N%1000 == 0: print(0) else: print(abs((A*1000)-N))
p02612
s956955132
Accepted
n = int(input()) res = n % 1000 if (res > 0): res = 1000 - res print(res)
p02612
s240191319
Accepted
import math n = int(input()) print(math.ceil(n/1000)*1000 - n)
p02612
s287106791
Accepted
# coding: utf-8 # submission # - User: herp_sy # https://atcoder.jp/contests/ # # lang: Python3 (3.8.2) import math import statistics import numpy as np import queue import itertools import functools n = int(input()) print(0 if n % 1000 == 0 else 1000 - (n % 1000))
p02612
s422921861
Accepted
print(-int(input())%1000)
p02612
s259743390
Accepted
N=int(input()) print((1000-N%1000)%1000)
p02612
s610730627
Accepted
print(-int(input()) % 1000)
p02612
s241640647
Accepted
N=int(input()) print((1000-N%1000)%1000)
p02612
s182400147
Accepted
n=int(input()) print(1000-n%1000 if n%1000 else 0)
p02612
s770687337
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: ans = 1000 - n % 1000 print(ans)
p02612
s154941253
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - (n % 1000))
p02612
s121144733
Accepted
N = int(input()) # N=map(int,input().split()) # A=list(map(int,input().split())) # B=list(map(int,input().split())) n = N // 1000 if N % 1000 == 0: print((1000*n)-N) else: print((1000*(n+1))-N)
p02612
s131346107
Accepted
n = int(input()) rem = n % 1000 if rem == 0: print(0) else: div = (n // 1000) + 1 print((div * 1000) - n)
p02612
s155086667
Accepted
N = int( input( ) ) x = N % 1000 if x == 0 : print( '0' ) else : print( 1000 - int(x) )
p02612
s261106037
Accepted
print(-int(input())%1000)
p02612
s851882014
Accepted
a = int(input()) i = 0 while 1000 * i < a: i += 1 print(1000 * i - a)
p02612
s603126521
Accepted
n = int(input()) if (n%1000 ==0): print(0) else: print(1000 - n%1000)
p02612
s383888811
Accepted
N = int(input()) for i in range(100): if i*1000>=N: print(i*1000-N) break
p02612
s019693007
Accepted
N, = map(int, input().split()) if N%1000: print(1000-(N%1000)) else: print(0)
p02612
s561231731
Accepted
N = int(input()) maisuu = N // 1000 if N % 1000 == 0 else N // 1000 + 1 print(maisuu * 1000 - N)
p02612
s594604929
Accepted
n=int(input()) ans=1000 if n<100: print(abs(n-ans)) exit() else: ans=1000 while(n>=ans): if ans==n: break elif ans>n: break else: ans+=1000 print(abs(n-ans))
p02612
s612983696
Accepted
n=int(input()) t=n % 1000 s=1000 - t if s==1000: print(0) else: print (s)
p02612
s133023367
Accepted
N = int(input()) ans = [] for i in range(1,12): ans.append(((i*1000)-N)) print(min([i for i in ans if i >= 0]))
p02612
s874962578
Accepted
import sys from collections import deque import numpy as np import math sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def Main(): n = I() a = math.ceil(n/1000) ans = 1000*a-n print(ans) return if __name__=='__main__': Main()
p02612
s314503836
Accepted
N = int(input()) ans = N // 1000 if N % 1000 == 0: print(0) else: print(1000*(ans+1) - N)
p02612
s289649823
Accepted
n = int(input()) if n%1000 == 0: print(0) else: d = n//1000 print((d+1)*1000 - n)
p02612
s243832628
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000-(n % 1000))
p02612
s378078857
Accepted
N = int(input()) if N%1000: print(1000 - (N%1000)) else: print(0)
p02612
s892074247
Accepted
import math n = int(input()) s = math.ceil(n/1000) print(int(s*1000 - n))
p02612
s669044383
Accepted
print(-int(input())%1000)
p02612
s267342955
Accepted
# -*- coding: utf-8 -*- n = int(input()) print(1000-(n%1000) if n%1000 != 0 else 0)
p02612
s740890053
Accepted
N = int(input()) while N>0: N-=1000 print(-N)
p02612
s814849042
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print(1000 - N%1000)
p02612
s968091731
Accepted
N = int(input()) amari = N % 1000 print(1000 - amari if amari != 0 else 0)
p02612
s512086278
Accepted
N = int(input()) while True: if N >= 1000: N -= 1000 else: break if N == 0: print(0) else: print(1000-N)
p02612
s070510064
Accepted
n=int(input()) if n%1000!=0: print(1000-n%1000) else: print(0)
p02612
s931610433
Accepted
n = int(input()) if n % 1000 != 0: print(1000 - (n % 1000)) else: print(n % 1000)
p02612
s533125272
Accepted
n=input() # print(n[-3:]) a=1000-int(n[-3:]) if a == 1000 : print(0) else: print(1000-int(n[-3:]))
p02612
s963731861
Accepted
N = int(input()) remain = N % 1000 print((1000-remain) % 1000)
p02612
s658259100
Accepted
N=int(input()) m=N%1000 ans=1000-m if ans==1000: print(0) else: print(ans)
p02612
s165294769
Accepted
a = int(input().rstrip()) n = [i for i in range(1,11) if(a <=i *1000)] print((min(n)*1000) - a)
p02612
s511894787
Accepted
N = int(input()) if N%1000 == 0: print(0) else: a = N//1000 + 1 print(a*1000 -N)
p02612
s391804339
Accepted
print(-int(input()) % 1000)
p02612
s862197524
Accepted
_MULTITEST = False ## def solve(): n = int(input()) k = (n // 1000) + (1 if n % 1000 != 0 else 0) print(k*1000 - n) ## if __name__ == "__main__": t = (int(input()) if _MULTITEST else 1) for tt in range(t): solve()
p02612
s845302838
Accepted
n = int(input()) ans = (1000-n%1000)%1000 print(ans)
p02612
s127162887
Accepted
n = int(input()) res = 0 while res < n: res+=1000 print(res-n)
p02612
s072730618
Accepted
N = int(input()) if N%1000==0: print(0) else: print(1000-N%1000)
p02612
s895083563
Accepted
print(-int(input())%1000)
p02612
s636296965
Accepted
N = int(input()) print(-N % 1000)
p02612
s430671465
Accepted
n = int(input()) print(0 if n % 1000 == 0 else 1000 - n % 1000)
p02612
s710759652
Accepted
n = int(input()) if n % 1000 == 0: print("0") exit() print(1000 - (n % 1000))
p02612
s939275476
Accepted
n = int(input()) answer = (-n) % 1000 print(answer)
p02612
s595053606
Accepted
N = int(input()) print(1000-N % 1000 if N % 1000 else 0)
p02612
s992895918
Accepted
n=int(input()) c=n%1000 if c==0: print(0) else: print(1000-c)
p02612
s359116059
Accepted
N = int(input()) print(((N + 999)//1000)*1000 - N)
p02612
s396853580
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print(1000 - (N % 1000))
p02612
s963508779
Accepted
n=int(input()) print((10000-n)%1000)
p02612
s466635027
Accepted
n=int(input()) print((-n)%1000)
p02612
s305092179
Accepted
A = int(input()) for i in range(1, 11): tmp = 1000 * i if A <= tmp: print(tmp-A) break
p02612
s255597689
Accepted
# -*- coding: utf-8 -*- # 整数の入力 a = int(input()) # 出力 print("{}".format((1000-(a%1000))%1000))
p02612
s331285016
Accepted
n=int(input()) if n%1000: while n>1000: n-=1000 print(1000-n) else: print(0)
p02612
s060012623
Accepted
n = int(input()) r = n % 1000 if r: print(1000-r) else: print(0)
p02612
s423631232
Accepted
#!/usr/bin/env python3 N = int(input()) if N % 1000 == 0: print(0) else: n = N // 1000 print((n+1)*1000-N)
p02612
s536122390
Accepted
n = int(input()) n %= 1000 if n==0: print(0) else: print(1000-n)
p02612
s663574352
Accepted
N=int(input()) x = N % 1000 print((1000 - x) % 1000)
p02612
s463286326
Accepted
N=int(input()) for i in range(1,10001): if i*1000>=N: ans=i*1000-N break print(int(ans))
p02612
s003811789
Accepted
def solve(): N = int(input()) if N % 1000 == 0: print(0) else: print(1000 - (N % 1000)) if __name__ == "__main__": solve()
p02612
s849562983
Accepted
def main(): from sys import stdin readline = stdin.readline N = int(readline().rstrip()) result = ( 10000 - N )%1000 print(result) main()
p02612
s099702039
Accepted
n = int(input()) a = n % 1000 if (a != 0): print(1000 - a) else: print(0)
p02612
s594713148
Accepted
n = input() n_l = int(n[-3:]) if n_l==0: print(0) else: print(1000-n_l)
p02612
s471091675
Accepted
N = int(input()) print((1000 - N)%1000)
p02612
s499945486
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - n % 1000)
p02612
s207541077
Accepted
import sys def II(): return int(input()) def MI(): return map(int,input().split()) def LI(): return list(map(int,input().split())) def TI(): return tuple(map(int,input().split())) def RN(N): return [input().strip() for i in range(N)] def main(): N = II() ans = 1000-N%1000 if ans==1000: print(0) else: print(ans) if __name__ == "__main__": main()
p02612
s892394479
Accepted
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines sys.setrecursionlimit(10 ** 9) INF = 1 << 60 MOD = 1000000007 def main(): N = int(readline()) n = (N + 999) // 1000 ans = n * 1000 - N print(ans) return if __name__ == '__main__': main()
p02612
s732959451
Accepted
product = int(input()) remain = product % 1000 if remain != 0: change = 1000 - remain else: change = 0 print(change)
p02612
s097701091
Accepted
n = int(input()) if n % 1000 == 0: print(0) else: print(1000 - n % 1000)
p02612
s030444887
Accepted
import math if __name__ == '__main__': n = int(input()) num = abs(n-(math.ceil(n/1000)*1000)) print(num)
p02612
s272740713
Accepted
N = int(input()) while N > 0: N -= 1000 if N < 0: N *= -1 print(N)
p02612
s208777821
Accepted
N = int(input()) print("{}".format(1000 - N % 1000 if N % 1000 != 0 else 0))
p02612
s150620373
Accepted
n = int(input()) for i in range(11): if n <= i * 1000: print(i * 1000 - n) exit(0)
p02612
s509487646
Accepted
N = int(input()) if N%1000 == 0 : print(0) else : print(1000 - N%1000 )
p02612
s679648315
Accepted
n = int(input()) print((1000-n%1000)%1000)
p02612
s088826398
Accepted
n = int(input()) for i in range(1,11): tmp = i*1000 if n==tmp: print(0) break else: if n - tmp < 0: print(abs(n-tmp)) break
p02612
s964673575
Accepted
n = int(input()) print((1000 - n % 1000) % 1000)
p02612
s347458340
Accepted
x = int(input()) if x % 1000 == 0: print(0) else: print(1000-x%1000)
p02612
s925556252
Accepted
N = int(input()) if N%1000==0: print(0) else: print(1000-(N%1000))
p02612
s579052580
Accepted
N = int(input()) if N % 1000 == 0: print(0) else: print(1000 - N % 1000)
p02612
s810409071
Accepted
n = int(input()) if n<=1000: print(1000-n) else: mod = n%1000 print((1000-mod) if mod>0 else 0)
p02612
s524477641
Accepted
s = input() a = [int(c) for c in s] if len(a) < 4: print(1000 - int(s)) elif a[-3] != 0: print((a[-4]+1)*1000 - int(s)) elif int(s) % 1000 != 0: print((a[-4]+1)*1000 - int(s)) else: print(0)
p02612
s364860216
Accepted
n=input() m=len(n) if m<=3: print(1000-int(n)) else: if int(n[m-3:])==0: print(0) else: print(1000-int(n[m-3:]))
p02612
s496701355
Accepted
n=int(input()) if n%1000==0: print(0) else: print(1000-n%1000)
p02612
s608760070
Accepted
(N, ) = [int(n) for n in input().split()] if N % 1000 == 0: print(0) else: print(1000 - N % 1000)
p02612
s432338613
Accepted
def main(): arg = int(input()) if arg % 1000 == 0: ans = 0 else: ans = 1000 - (arg % 1000) print(str(ans)) if __name__ == '__main__': main()
p02612
s337292180
Accepted
n=int(input()) while n > 0: n-=1000 print(n*-1)
p02612
s221223920
Accepted
n = int(input()) k,l = n//1000, n%1000 if l == 0: print(0) else: print(1000 - l)