problem_id stringclasses 100
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 6 806 |
|---|---|---|---|
p02612 | s757069416 | Accepted | n = int(input())
if n % 1000 == 0:
print(0)
else:
print(1000-n%1000)
|
p02612 | s880530369 | Accepted | n = int(input())%1000
if n:
print(1000-n)
else:
print(n) |
p02612 | s493836979 | Accepted | N = int(input())
amari = N % 1000
if amari == 0:
print(0)
else:
print(1000 - amari) |
p02612 | s745477983 | Accepted | mod = 1000
N = int(input())
if N%mod==0:
print(0)
else:
print(1000-N%mod) |
p02612 | s046347796 | Accepted | def main():
n = int(input())
if n % 1000 == 0:
print(0)
else:
print(1000 - n % 1000)
if __name__ == '__main__':
main() |
p02612 | s305481176 | Accepted | N = int(input())
a = N//1000
change = ((a+1) * 1000) - N
if change%1000 == 0:
change = 0
print(change) |
p02612 | s343472965 | Accepted | print(-int(input())%1000) |
p02612 | s239102258 | Accepted | n = int(input())
a = 10000
ans = (a - n) % 1000
print(ans) |
p02612 | s925964116 | Accepted | import os
N = int(input())
modN = N % 1000
if modN != 0:
res = 1000 - modN
else:
res = 0
print(res)
|
p02612 | s333212759 | Accepted | x=int(input())
z=x%1000
if z==0:
print(0)
else:
print(1000-z) |
p02612 | s377183884 | Accepted | N = int(input())
a = N//1000
b = ((a+1)*1000)-N
if b%1000 == 0:
b = 0
print(b) |
p02612 | s376584020 | Accepted | #A - Payment
N = int(input())
#おつり
out = 1000 - (N % 1000)
if out == 1000: out = 0
# 出力
print(out)
|
p02612 | s050727343 | Accepted | #!/usr/bin/env python3
def main():
n = int(input())
print((1000 - n % 1000) % 1000)
if __name__ == '__main__':
main()
|
p02612 | s137105573 | Accepted | def main():
n = int(input())
while n > 1000:
n -= 1000
print(1000 - n)
if __name__ == "__main__":
main() |
p02612 | s348335830 | Accepted | n=int(input())
r=n%1000
if 1000-r==1000:
print(0)
else:
print(1000-r)
|
p02612 | s223354152 | Accepted | N=int(input())
if N%1000==0:
print(0)
else:
print(1000-N%1000) |
p02612 | s466739536 | Accepted | N = int(input())
S = divmod(N, 1000)
if S[1] == 0:
print (S[1])
else:
print (1000 - S[1]) |
p02612 | s519044783 | Accepted | N = int(input())
res = 0
if N%1000 != 0:
res = 1000-(N%1000)
print(res) |
p02612 | s988728425 | Accepted | N = int(input())
k = N%1000
if k == 0:
k=1000
print(1000-k) |
p02612 | s566108437 | Accepted | n=int(input())
if n%1000!=0:
print(1000-n%1000)
else:
print(0) |
p02612 | s976215660 | Accepted | n = int(input())
#l = list(map(int, input().split()))
if n%1000 == 0:
print(0)
else:
print(1000-n%1000) |
p02612 | s675600277 | Accepted | n = int(input())
if n%1000==0:
print(0)
else:
print(1000-n%1000) |
p02612 | s553097723 | Accepted | N = int(input())
answer = 1000 - (N%1000)
answer = answer%1000
print(answer)
|
p02612 | s783239095 | Accepted | n = int(input())
while n > 1000:
n -= 1000
print(1000 - n)
|
p02612 | s293709016 | Accepted | import math
x = int(input())
y = math.ceil(x/1000)
print(1000*y-x) |
p02612 | s267693305 | Accepted | def solve():
N = int(input())
print((1000-N%1000)%1000)
if __name__ == "__main__":
solve() |
p02612 | s576712393 | Accepted | N = int(input())
print((10000 - N) % 1000) |
p02612 | s021519034 | Accepted | n = int(input())
a = n // 1000
if n % 1000 != 0:
b = a + 1
print(f"{1000*b-n}")
else:
print("0") |
p02612 | s098220034 | Accepted | A = int(input())
result = A%1000
if result != 0:
result = 1000 - result
print(result) |
p02612 | s680236434 | Accepted | print(-int(input())%1000) |
p02612 | s322917578 | Accepted | d = int(input())
a = d % 1000
if a == 0:
print(0)
else:
print(1000 - a) |
p02612 | s891126550 | Accepted | n = int(input())
ans = n % 1000
if ans == 0:
print(0)
else:
print(1000-ans)
|
p02612 | s922686433 | Accepted | n = int(input())
print(-n%1000)
|
p02612 | s229999882 | Accepted | N = int(input())
while True:
N -= 1000
if N <= 0:
break
print(abs(N)) |
p02612 | s773926863 | Accepted | from math import log10
n = int(input())
i = 1
while True:
if n <= 1000 * i:
print((1000 * i) - n)
break
i += 1
|
p02612 | s828827014 | Accepted | import math
n = int(input())
num = int(math.ceil(float(n)/1000))
print(num*1000-n)
|
p02612 | s503809474 | Accepted | price = input()
if not int(price) % 1000:
print("0")
else:
if len(price) > 3:
result = 1000 * (int(list(price)[0])+1) - int(price)
else:
result = 1000 - int(price)
print(result) |
p02612 | s859837440 | Accepted | n=int(input())
if n%1000==0:
print(0)
else:
print(1000-n%1000) |
p02612 | s609111912 | Accepted | N = int(input())
if N % 1000 == 0:
print(0)
else:
print(1000 - (N % 1000))
|
p02612 | s911808789 | Accepted | print(-int(input())%1000) |
p02612 | s060575624 | Accepted | n=int(input())
print((1000-n%1000)%1000)
|
p02612 | s462934559 | Accepted | N = int(input())
a = N//1000
b = ((a+1)*1000)-N
if b%1000 == 0:
b = 0
print(b)
|
p02612 | s018399466 | Accepted | N = int(input())
a = 1000
while N>a:
a += 1000
print(a-N) |
p02612 | s502731822 | Accepted | N = int(input())
k = 1000
while(N > k):
k += 1000
print(k - N) |
p02612 | s581525779 | Accepted | a = int(input())
b = a % 1000
if b == 0:
print(0)
else:
print(1000 - b) |
p02612 | s820336913 | Accepted | N = int(input())
print((1000 - N%1000)%1000) |
p02612 | s496548260 | Accepted | N = int(input())
i = 0
while True:
if 0 < N <= 1000 * i:
print(1000 * i - N)
break
i += 1 |
p02612 | s417999828 | Accepted | n=int(input())
print(((-(-n//1000))*1000)-n) |
p02612 | s828412211 | Accepted | n = int(input())
if n%1000==0:
ans=0
else:
x=n%1000
ans=1000-x
print(ans) |
p02612 | s163928375 | Accepted | n = int(input())
if n % 1000 == 0:
print(0)
else:
print((n // 1000 + 1) * 1000 - n)
|
p02612 | s368528367 | Accepted | N=int(input())
if N%1000==0:
print(0)
else:
print(1000-N%1000) |
p02612 | s835008422 | Accepted | N = int(input())
if N % 1000 == 0:
print(0)
else:
print(1000 - N%1000) |
p02612 | s423726866 | Accepted | n = int(input())
print(-n % 1000) |
p02612 | s324567524 | Accepted | N=int(input())
if N%1000>0:
print(1000-N%1000)
else:
print(0) |
p02612 | s598639376 | Accepted | n = int(input())
if n % 1000 == 0:
print(0)
else:
print(1000 - (n % 1000)) |
p02612 | s207393834 | Accepted | n=int(input())
ans=0
for i in range(1000):
ans=n+i
if ans%1000==0:
print(i)
break |
p02612 | s274744991 | Accepted | """
https://atcoder.jp/contests/intro-heuristics/tasks/intro_heuristics_a
"""
import numpy as np
def load_input_as_int_array() -> np.ndarray:
return np.array([int(v) for v in input().split(" ")])
def main() -> None:
N, = load_input_as_int_array()
focus = N % 1000
result = 1000 - focus if focus != 0 else 0
print(result)
main()
|
p02612 | s518626994 | Accepted | N = int(input())
if N % 1000 == 0:
print(0)
else:
print(1000 - (N % 1000)) |
p02612 | s354981063 | Accepted | N = int(open(0).read())
m = N % 1000
if m == 0:
print(0)
else:
print(1000 - m) |
p02612 | s247218817 | Accepted | def main():
N = int(input())
r, m = divmod(N, 1000)
if m == 0:
print(0)
else:
print(1000 - m)
if __name__ == "__main__":
main() |
p02612 | s586988113 | Accepted | print((-int(input()))%1000) |
p02612 | s767276520 | Accepted | import sys
N=int(input())
i=0
for i in range(0,10001,1000):
if i >= N:
print(i-N)
sys.exit() |
p02612 | s919644422 | Accepted | import math
N = int(input())
print(math.ceil(N / 1000) * 1000 - N) |
p02612 | s862593118 | Accepted | n=int(input())
import math
m=math.ceil(n/1000)
print(m*1000-n) |
p02612 | s345058390 | Accepted | N = int(input())
if N % 1000 == 0:
print(0)
else:
print(1000 - (N % 1000))
|
p02612 | s665928897 | Accepted | n = int(input())
if n%1000 == 0:
print(0)
else:
print(1000-n%1000) |
p02612 | s955331220 | Accepted | N=int(input())
ans=N%1000
if ans!=0:
ans=1000-ans
print(ans) |
p02612 | s900138340 | Accepted | def resolve():
pay = int(input()[-3:])
rest = 1000 - pay
if pay == 0:
print(0)
else:
print(rest)
resolve() |
p02612 | s243518504 | Accepted | a=input()
if len(a)==4 or len(a)==5:
b=a[1:]
c=1000-int(b)
if c==1000 :
print('0')
else:
print(c)
else:
print(1000-int(a))
|
p02612 | s690905560 | Accepted | def solve(n):
return 0 if n % 1000 == 0 else 1000 - n % 1000
n = int(input())
print(solve(n)) |
p02612 | s728486797 | Accepted | N = int(input())
if (N % 1000 == 0):
print(0)
else:
print(1000 - N % 1000) |
p02612 | s950219003 | Accepted | import math
N = int(input())
res = int(math.ceil(N / 1000)) * 1000 - N
print(res) |
p02612 | s611818373 | Accepted | N = int(input())
if N%1000!=0:
print(str(1000-N%1000))
else:
print(str(0)) |
p02612 | s134672054 | Accepted | def main():
n = int(input())
x = 0
while x < n:
x += 1000
print(x - n)
if __name__ == "__main__":
main() |
p02612 | s484775504 | Accepted | n = int(input())
x = (n+1000-1)//1000
x*=1000
print(x-n) |
p02612 | s133363801 | Accepted | n = int(input())
a = n % 1000
if a == 0:
ans = 0
else:
ans = 1000 - a
print(ans) |
p02612 | s664491115 | Accepted | n = int(input())
if n % 1000 != 0:
print(1000-(n%1000))
else:
print(0) |
p02612 | s049518082 | Accepted | import sys
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))
def solve():
N = ini()
d = N % 1000
if d == 0:
return 0
return 1000 - d
print(solve())
|
p02612 | s389143698 | Accepted | print(-int(input())%1000)
|
p02612 | s114182590 | Accepted | n = int(input())
#print(n)
while n > 0:
n -= 1000
print(abs(n)) |
p02612 | s168752074 | Accepted | import sys
def main():
input = sys.stdin.buffer.readline
n = int(input())
print(0 if n % 1000 == 0 else 1000 - n % 1000)
if __name__ == '__main__':
main()
|
p02612 | s513894942 | Accepted | import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy
N = int(input())
mult = (N + 999) // 1000
print(mult * 1000 - N) |
p02612 | s141141024 | Accepted | N = int(input())
print((1000-N%1000)%1000) |
p02612 | s312239782 | Accepted | n = int(input())
if n%1000 == 0:
print(0)
else:
ans1 = n//1000+1
ans2 = ans1*1000
print(ans2-n)
|
p02612 | s599885491 | Accepted | #array=map(int,input().split())
N=int(input())
turi=(N//1000)*1000-N
if turi<0: turi+=1000
print(turi) |
p02612 | s260686277 | Accepted | N=int(input())
if N%1000==0:
print(0)
else:
print(1000-N%1000) |
p02612 | s564198828 | Accepted | n = int(input())
if n% 1000 == 0:
print(0)
else:
print(1000 - n%1000) |
p02612 | s434239775 | Accepted | print(-int(input())%1000) |
p02612 | s197397740 | Accepted | N = int(input())
x = N % 1000
if(x != 0):
print(1000-x)
else:
print(0) |
p02612 | s926165511 | Accepted | # coding:utf-8
import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools
#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]
N = int(input())
ans = N%1000
if(ans != 0):
ans = 1000-ans
print(ans)
|
p02612 | s696543707 | Accepted | N = int(input())
print(-N%1000) |
p02612 | s007723857 | Accepted | n = int(input())
while n > 1000:
n -= 1000
print(1000 - n) |
p02612 | s618856919 | Accepted | N = int(input())
while N >= 0:
N -= 1000
if N == 0:
break
print(abs(N)) |
p02612 | s135227894 | Accepted | print( 1000 - (int(input())-1)%1000-1) |
p02612 | s348131107 | Accepted | N=1000-int(input())%1000
print(N*(N<1000)) |
p02612 | s169297738 | Accepted | N = (int)(input())
rem = N%1000
if rem == 0:
print(0)
else:
print(1000-N%1000) |
p02612 | s472059240 | Accepted | N = int(input())
for i in range(1, 11):
if 1000 * i >= N:
break
print(1000 * i - N)
|
p02612 | s215199825 | Accepted | n = input()
x = 1000-int(n[-3:])
print(0 if x == 1000 else x) |
p02612 | s488695399 | Accepted | n = int(input())
if n % 1000 == 0:
print(0)
else:
bill = n // 1000 + 1
print(1000*bill - n)
|
p02612 | s619096285 | Accepted | N=int(input())
i=1
while 1000*i<N:
i+=1
print(1000*i-N) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.