ZhenlongDai/ACPR huggingface dataset:
Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
three =  list(map(int, input().split()))
r = three[0]
g = three[1]
b = three[2]
g = str(g)
b = str(b)
gb = g + b
gb = int(gb)

if gb%4 ==0:
    print('Yes')
else:
    print('No')

Failing test case input:
0 18 1

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
three =  list(map(int, input().split()))
r = three[0]
g = three[1]
b = three[2]
g = str(g)
b = str(b)
gb = g + b
gb = int(gb)

if gb%4 ==0:
    print('YES')
else:
    print('NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
three =  list(map(int, input().split()))
r = three[0]
g = three[1]
b = three[2]
g = str(g)
b = str(b)
gb = g + b
gb = int(gb)

if gb%4 ==0:
    print('Yes')
else:
    print('No')
    

Failing test case input:
5 6 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
three =  list(map(int, input().split()))
r = three[0]
g = three[1]
b = three[2]
g = str(g)
b = str(b)
gb = g + b
gb = int(gb)

if gb%4 ==0:
    print('YES')
else:
    print('NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c= input().split(" ")
x =int(a+b+c)

if x%3==0 or x%4==0:
    print("YES")
else:
    print("NO")

Failing test case input:
13 1 7

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a,b,c= input().split(" ")
x =int(a+b+c)

if x%4==0:
    print("YES")
else:
    print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

a, b, c = map(int, readline().rstrip().split())

print("YES" if a*100+b*10+c % 4 == 0 else "NO")


Failing test case input:
9 6 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

a, b, c = map(int, readline().rstrip().split())

print("YES" if (a*100+b*10+c) % 4 == 0 else "NO")

Problem: p03693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print("Yes" if int(input().replace(" ",""))%4==0 else "No")

Failing test case input:
2 12 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
print("YES" if int(input().replace(" ",""))%4==0 else "NO")
Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,c=INTM()
    if (a*100+b*10*c)%4 == 0:
        print('YES')
    else:
        print('NO')
if __name__ == '__main__':
    do()

Failing test case input:
1 12 2

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,c=INTM()
    if (a*100+b*10+c)%4 == 0:
        print('YES')
    else:
        print('NO')
if __name__ == '__main__':
    do()

Problem: p03693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print("No" if int(input().replace(" ",""))%4 else "Yes")

Failing test case input:
3 6 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
print("NO" if int(input().replace(" ",""))%4 else "YES")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
array = input().split()
score = int(array[1]) * 10 + int(array[2])
print(score)
if score % 4 == 0:
   print("YES")
else:
    print("NO")

Failing test case input:
7 6 0

Expected output:
YES


Actual output:
60
YES


Fixed submission (verdict: Accepted):
array = input().split()
score = int(array[1]) * 10 + int(array[2])
if score % 4 == 0:
   print("YES")
else:
    print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


r, g, b = map(int, input().split())
n = g*10 + b

if n % 4 == 0:
    print("YES")
else:
    print("No")

Failing test case input:
1 2 9

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):


r, g, b = map(int, input().split())
n = r*100 + g*10 + b

if n % 4 == 0:
    print("YES")
else:
    print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r,g,b = map(int, input().split())
if (100*r+10*g+b) & 4 == 0:
    print('Yes')
else:
    print('No')

Failing test case input:
2 7 0

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
r,g,b = map(int, input().split())
if (100*r+10*g+b) % 4 == 0:
    print("YES")
else:
    print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print("YES" if 100*a+10*b+c%4==0 else "NO")

Failing test case input:
9 6 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print("YES" if (100*a+10*b+c)%4==0 else "NO")
Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r,g,b = map(int,input().split())
number1 = str(r+g+b)
number2 = int(number1)
if number2%4 == 0:
    print("YES")
else:
    print("NO")

Failing test case input:
3 6 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
r,g,b = map(int,input().split())
1 <= r <= 9
1 <= g <= 9
1 <= b <= 9
number1 = r*100 + g*10 + b
if number1%4 == 0:
    print("YES")
else:
    print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r, g, b = map(int, input().split())

if (10 * g + b) % 4 == 0:
  print("Yes")
else:
  print("No")

Failing test case input:
1 2 9

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
r, g, b = map(int, input().split())

if (10 * g + b) % 4 == 0:
  print("YES")
else:
  print("NO")

Problem: p03693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
r, g, b, = map(int, input().split())

if (r * 100 + g * 10 + b) % 4 == 0:
    print('YES')
else:
    print('No')

Failing test case input:
2 12 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
r, g, b = map(int, input().split())

if (r * 100 + g * 10 + b) % 4 == 0:
    print('YES')
else:
    print('NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r,g,b=map(int,input().split())
if (g*10+b) % 4 == 0:
    print("Yes")
else:
    print("No")

Failing test case input:
1 12 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
r,g,b=map(int,input().split())
if (g*10+b) % 4 == 0:
    print("YES")
else:
    print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r, g, b = map(int, input().split())
if (100*r+10*b+g)%4 == 0 : print('YES')
else : print('NO')


Failing test case input:
9 6 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
r, g, b = map(int, input().split())
if (100*r+10*g+b)%4 == 0 : print('YES')
else : print('NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

total = str(A) + str(B) + str(C)
print(total)
if int(total) % 4 == 0:
    print('Yes')
else:
    print('No')

Failing test case input:
9 6 0

Expected output:
YES


Actual output:
960
Yes


Fixed submission (verdict: Accepted):
from sys import stdin

A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

total = str(A) + str(B) + str(C)
if int(total) % 4 == 0:
    print('YES')
else:
    print('NO')

Problem: p03693
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
r,g,b = map(str,input().split())

n = r+g+b
flg = "No"
if int(n)%4 == 0:
    flg = "Yes"
    
print(flg)

Failing test case input:
7 6 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
r,g,b = map(str,input().split())

n = r+g+b
flg = "NO"
if int(n)%4 == 0:
    flg = "YES"
    
print(flg)
Problem: p03693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
r,g,b=input().split()
n=int(r+g+b)
if n%4==0:
  print("Yes")
elif n%4!=0:
  print("No")


Failing test case input:
5 6 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
r,g,b=input().split()
n=int(r+g+b)
if n%4==0:
  print("YES")
else:
  print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r, g, b = map(int, input().split())

if r * g * b % 4 == 0:
    print('YES')
else:
    print('NO')


Failing test case input:
2 7 0

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
r, g, b = map(int, input().split())

x = (r * 100) + (g * 10) + b

if x % 4 == 0:
    print('YES')
else:
    print('NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r,g,b = map(int,input().split())
num = 100*r + 10*g + b
if num % 4 == 0:
  print("Yes")
else:
  print("No")

Failing test case input:
5 6 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
r,g,b = map(int,input().split())
num = 100*r + 10*g + b
if num % 4 == 0:
  print("YES")
else:
  print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))
if int(a[0])%4 == 0:
    print('YES')
else:
    print('NO')


Failing test case input:
9 6 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
a = list(map(str,input().split()))
s = ''.join(a)
if int(s)%4 == 0:
    print('YES')
else:
    print('NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r,g,b = map(int,input().split())
print('YES' if (r*100 + g*10 + b % 4) == 0 else 'NO')

Failing test case input:
3 6 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
r,g,b = map(int,input().split())
print('YES' if (r*100 + g*10 + b) % 4 == 0 else 'NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r, g, b = input().split()
ans = r + g + b
if int(ans) % 4 == 0:
    print('YES')
else:
    print('No')


Failing test case input:
2 12 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
r, g, b = input().split()
ans = r + g + b
if int(ans) % 4 == 0:
    print('YES')
else:
    print('NO')

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int, input().split())
if (100 * a + 10 * b + c) % 4 == 0:
    print("Yes")
else:
    print("No")


Failing test case input:
3 6 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
if (100 * a + 10 * b + c) % 4 == 0:
    print("YES")
else:
    print("NO")

Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
r, g, b = map(int,input().split())
x = int(r+g+b)
 
if x % 4 == 0:
  print("YES")
else:
  print("NO")

Failing test case input:
1 2 9

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
r, g, b = list(input().split())
x = int(r+g+b)
 
if x % 4 == 0:
  print("YES")
else:
  print("NO")
Problem: p03693
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,a,b = map(int,input().split())
if ((100*x)+(10*a)+(b)% 4)== 0:
    print("Yes")
else:
    print("No")

Failing test case input:
1 6 0

Expected output:
YES


Actual output:
No


Fixed submission (verdict: Accepted):
x,a,b = map(int,input().split())
if (((100*x)+(10*a)+(b))% 4) == 0:
    print("YES")
else:
    print("NO")
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = 1000 - n%1000

print(max(ans,0))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
ans = 1000 - n%1000
if ans ==1000:
	ans -=1000
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
money=1000
while(1):
    if n<=money:
        break
    money+=1000
print(money%n)

Failing test case input:
490

Expected output:
510


Actual output:
20


Fixed submission (verdict: Accepted):
n=int(input())
money=1000
while(1):
    if n<=money:
        break
    money+=1000
print(money-n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = 1000 - n % 1000
print(ans)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
ans = 1000 - n % 1000
ans %= 1000
print(ans)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):





import sys
import heapq

def main():
    n = int(input())
    print(1000 - n % 1000)
    return

if __name__ == "__main__":
    main()

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):





import sys
import heapq

def main():
    n = int(input())
    print((1000 - n % 1000) % 1000)
    return

if __name__ == "__main__":
    main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
print(n % 1000)

Failing test case input:
636

Expected output:
364


Actual output:
636


Fixed submission (verdict: Accepted):
n = int(input())
print(-n % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

amari = N%1000

answer = 1000 - amari

print(answer)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())

amari = N % 1000

answer = 1000 - amari
if answer == 1000:
	answer = 0

print(answer)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
print(1000-n%1000)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
print((1000-n%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

for i in range(10):
    N -= 1000
    if N < 0:
        N += 1000
        print(N)
        break
    elif N == 0:
        print(N)


Failing test case input:
1021

Expected output:
979


Actual output:
21


Fixed submission (verdict: Accepted):
N = int(input())

for i in range(10):
    N -= 1000
    if N < 0:
        N += 1000
        print(1000-N)
        break
    elif N == 0:
        print(N)
        break

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


n = int(input())
print(n % 1000)


Failing test case input:
3520

Expected output:
480


Actual output:
520


Fixed submission (verdict: Accepted):

n = int(input())
print((1000 - (n % 1000)) % 1000)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    arg = int(input())
    if arg < 1000:
        ans = 1000 - arg
    else:
        ans = 1000 - (arg % 1000)
    print(str(ans))


if __name__ == '__main__':
    main()


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
def main():
    arg = int(input())
    if arg % 1000 == 0:
        ans = 0
    else:
        ans = 1000 - (arg % 1000)
    print(str(ans))


if __name__ == '__main__':
    main()

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def main():
    N = int(input())
    a = N % 1000
    if a > 500:
        print(1000 - a)
    else:
        print(a)

if __name__ == '__main__':
    main()

Failing test case input:
1014

Expected output:
986


Actual output:
14


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    a = N % 1000
    while N > 0:
        N -= 1000
    print(-N)

if __name__ == '__main__':
    main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
for i in range(1, 10):
    if i*1000 > N:
        print(i*1000-N)
        exit()

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
for i in range(10):
    if (i+1)*1000 >= N:
        print((i+1)*1000-N)
        exit()

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):

import os
from sys import stdin, stdout


def solve(tc):
  n = int(stdin.readline().strip())
  print(1000 - (n%1000))


tcs = 1
tc = 1
while tc <= tcs:
  solve(tc)
  tc += 1

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):

import os
from sys import stdin, stdout


def solve(tc):
  n = int(stdin.readline().strip())
  rem = n%1000
  print(1000-rem if rem>0 else 0)


tcs = 1
tc = 1
while tc <= tcs:
  solve(tc)
  tc += 1

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
c=n%1000
if c>=500:
    print(1000-c)
else:
    print(c)

Failing test case input:
490

Expected output:
510


Actual output:
490


Fixed submission (verdict: Accepted):
n=int(input())
c=n%1000
if c==0:
    c=1000
print(1000-c)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
print(1000-(int(input())%1000))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
print((1000-(int(input())%1000))%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
for i in range(0,11):
  if i*1000 < N and N <= (i+1)*1000:
    break
print(N-1000*i)
    

Failing test case input:
721

Expected output:
279


Actual output:
721


Fixed submission (verdict: Accepted):
N = int(input())
for i in range(0,11):
  if i*1000 < N and N <= (i+1)*1000:
    break
print(1000*(i+1) - N)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
ans = 0
if N > 1000:
    if N % 1000 == 0:
        ans = 0
    else:
        ans = 1000 - (N % 1000)
print(ans)   

Failing test case input:
660

Expected output:
340


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
if N % 1000 == 0:
        ans = 0
else:
    ans = 1000 - (N % 1000)
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num = int(input()) 
i = 0

while True:
    ans = 1000*i - num
    if ans > 0:
        break
    i += 1

print(ans)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
num = int(input()) 
i = 0

while True:
    ans = 1000*i - num
    i+=1
    if ans >= 0:
        break

print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
n = n%1000
n = 1000 - n
print(n)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
n = n%1000
n = (1000 - n )%1000
print(n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=input()
i=(int(N[0])+1)*1000
j=i-int(N)

if j==1000:
  print(0)
else:
  print(j)


Failing test case input:
504

Expected output:
496


Actual output:
5496


Fixed submission (verdict: Accepted):
N=input()
if len(N)>3:
    i=(int(N[:-3])+1)*1000
else:
    i=1000

j=i-int(N)

if j>999:
  print(0)
else:
  print(j)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

print(1000 - (n % 1000))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
a = (1000 - (n % 1000)) % 1000
print(a)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a =  int(input())
r = 1000 - (a % 1000)
print(r)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
a =  int(input())
print((1000 - a % 1000) % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = 1900

r = N
while  r >= 1000:
	r = r-1000

if r == 0:
	print(0)
else:
	print(1000-r)

Failing test case input:
1698

Expected output:
302


Actual output:
100


Fixed submission (verdict: Accepted):
N = int(input())

r = N
while  r >= 1000:
	r = r-1000

if r == 0:
	print(0)
else:
	print(1000-r)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10 ** 7)



from collections import deque



def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    print(N)

if __name__ == "__main__":
    main()


Failing test case input:
660

Expected output:
340


Actual output:
660


Fixed submission (verdict: Accepted):
import sys

sys.setrecursionlimit(10 ** 7)



from collections import deque

import itertools


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    print((-N)%1000)


if __name__ == "__main__":
    main()
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
if N % 2 ==0:
    print(0)
else:
    print((1000-(N % 1000)))


Failing test case input:
1054

Expected output:
946


Actual output:
0


Fixed submission (verdict: Accepted):

N = int(input())
if N % 1000 == 0:
    print(0)
else:
    print((1000-(N % 1000)))

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a = int(input())
print(a%1000)

Failing test case input:
1900

Expected output:
100

Actual output:
900


Fixed submission (verdict: Accepted):
a = int(input())
print((500000-a)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
print(1000-n%1000)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n=int(input())
print((1000-n%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
n1 = n%1000

if n1 == 0:
    print(0)
else:
    print(1000-n)

Failing test case input:
1900

Expected output:
100

Actual output:
-900


Fixed submission (verdict: Accepted):
n = int(input())
n1 = n%1000

if n1 == 0:
    print(0)
else:
    print(1000-n1)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
res = N%1000

if N == 0:
  print(res)
else:
  print(1000-res)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
res = N%1000

if res == 0:
  print(res)
else:
  print(1000-res)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
N = int(input())
for i in range(math.floor(N/1000)):
  N -= 1000
print(1000 - N)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
import math
N = int(input())
for i in range(math.floor(N/1000)):
  N -= 1000
if N != 0:
  print(1000 - N)
else:
  print(0)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())

if 1000- (n%1000) != 0:print(1000- (n%1000))
else:print(0)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n=int(input())
m=n%1000

if m==0:print(0)
else:print(1000-m)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
print((1000 - N % 1000) % 10000)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
print((1000 - N % 1000) % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
N = int(input())

ans = 0
if N % 1000 == 0:
  ans = 0
else:
  ans = N % 1000
  
print(ans)



Failing test case input:
1361

Expected output:
639


Actual output:
361


Fixed submission (verdict: Accepted):
import sys
N = int(input())

ans = 0
if N % 1000 == 0:
  ans = 0
else:
  ans = 1000 - (N % 1000)

print(ans)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
_value = int(input())
_charge = 1000 - (_value % 1000)
print(_charge)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
_value = int(input())
_charge = 1000 - (_value % 1000)
if _charge != 1000:
  print(_charge)
else:
  print("0")

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
ans = 0
if N > 1000:
  ans = 1000 - (N % 1000)
print(ans)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
if N % 1000 == 0:
        ans = 0
else:
    ans = 1000 - (N % 1000)
print(ans)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
print(1000-(int(input())%1000))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
print((1000-(int(input())%1000))%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
a = int(input())
b = a
a = math.ceil(a/1000)
a = a * 1000
print(b-a)

Failing test case input:
769

Expected output:
231


Actual output:
-231


Fixed submission (verdict: Accepted):
import math
a = int(input())
b = a
a = math.ceil(a/1000)
a = a * 1000
print(a-b)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
print(N%1000)

Failing test case input:
1021

Expected output:
979


Actual output:
21


Fixed submission (verdict: Accepted):
N = int(input())
print((10000-N)%1000)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import math

n = int(input())
x = math.ceil(1100/1000)
s = 1000*x

if n > s:
    result = n - s
else:
    result = s - n
    
print(result)

Failing test case input:
504

Expected output:
496


Actual output:
1496


Fixed submission (verdict: Accepted):
import math

n = int(input())
x = math.ceil(n/1000)
s = 1000*x

if n > s:
    result = n - s
else:
    result = s - n
    
print(result)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

def main():
    N = int(input())
    print(min(N % 1000, 1000 - N % 1000))


if __name__ == "__main__":
    main()


Failing test case input:
3086

Expected output:
914


Actual output:
86


Fixed submission (verdict: Accepted):

def main():
    N = int(input())
    print(1000 - N % 1000 if N % 1000 else 0)


if __name__ == "__main__":
    main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input()) 

while N > 0:
  N = N - 1000

print(N)

Failing test case input:
2720

Expected output:
280


Actual output:
-280


Fixed submission (verdict: Accepted):
N = int(input()) 

while N > 0:
  N = N - 1000

if N < 0:
  N = N * -1

print(N)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
d = N / 1000

d = d - int(d)
d = d*10

if d == 0:
    print(0)
else:
    print(int(d*100))

Failing test case input:
3264

Expected output:
736


Actual output:
263


Fixed submission (verdict: Accepted):
N = int(input())
d = N % 1000


if 1000 - d == 0 or d == 0:
    print(0)
else:
    print(1000 - d)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
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(9000- n)
elif 5000< n <=6000:
    print(5000- n)
elif 6000< n <=7000:
    print(6000- n)
elif 7000< n <=8000:
    print(7000- n)
elif 8000< n <=9000:
    print(8000- n)
elif 1000< n <=10000:
    print(10000- n)

Failing test case input:
5614

Expected output:
386


Actual output:
-614


Fixed submission (verdict: 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)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())

print(1000 - (N %1000))


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())

print((1000 - (N %1000))%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=int(input())%1000;print(min(1000-a,a))

Failing test case input:
1021

Expected output:
979


Actual output:
21


Fixed submission (verdict: Accepted):
print((1000-int(input())%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = n % 1000 if n > 1000 else 1000 - n
print(ans)


Failing test case input:
2720

Expected output:
280


Actual output:
720


Fixed submission (verdict: Accepted):
n = int(input())
mod = n % 1000
ans = 1000 - mod if mod != 0 else 0
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
if x >= 30:
    print("Yes")
else:
    print("No")

Failing test case input:
1900

Expected output:
100

Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
if n%1000 == 0:
    print (0)
else:
    print (1000-n%1000)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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
    print(ans)

if __name__ == '__main__':
    main()


Failing test case input:
1861

Expected output:
139


Actual output:
-861


Fixed submission (verdict: 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()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
ans = 0
if N > 1000:
    if N % 1000 == 0:
        ans = 0
    else:
        ans = 1000 - (N % 1000)
print(ans)

Failing test case input:
975

Expected output:
25


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
if N % 1000 == 0:
        ans = 0
else:
    ans = 1000 - (N % 1000)
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(1000-int(input())%1000)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
print((1000-int(input())%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

y = 1000 - x % 1000

print(y)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
x = int(input())

y = (10000 - x) % 1000

print(y)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
N = N % 1000
ans = 1000 - N
print(ans)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
N = N % 1000
if N == 0:
    ans = 0
else:
    ans = 1000 - N
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

if n%1000 == 0:
  print(0)
else:
  while n > 1000:
    n = n - 1000
  print(n)  

Failing test case input:
2807

Expected output:
193


Actual output:
807


Fixed submission (verdict: Accepted):
n = int(input())

if n%1000 == 0:
  print(0)
else:
  while n > 1000:
    n = n - 1000
  print(1000 - n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
otsuri = N % 1000
if otsuri > 0:
    orsuri = 1000 - otsuri
print(otsuri)


Failing test case input:
656

Expected output:
344


Actual output:
656


Fixed submission (verdict: Accepted):
N = int(input())
otsuri = N % 1000
if not otsuri == 0:
    otsuri = 1000 - otsuri
print(otsuri)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

r = N
while  r >= 1000:
	r = r-1000
print(r)

Failing test case input:
2651

Expected output:
349


Actual output:
651


Fixed submission (verdict: Accepted):
N = int(input())

r = N
while  r >= 1000:
	r = r-1000

if r == 0:
	print(0)
else:
	print(1000-r)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = int(input())
b = a % 1000
ans = 1000 - b 
print(ans)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
a = int(input())
b = a % 1000
if b != 0:
	ans = 1000 - b 
else:
	ans = b
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
while n<=0:
  n-=1000
print(abs(n))

Failing test case input:
699

Expected output:
301


Actual output:
699


Fixed submission (verdict: Accepted):
n=int(input())
while n>0:
  n-=1000
print(abs(n))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

N = ri()
print(1000 - N % 1000)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

N = ri()
print(1000 - N % 1000 if N % 1000 > 0 else 0)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
otsuri = 1000 - N%1000
print(otsuri)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
otsuri = (1000 - N%1000)%1000
print(otsuri)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
N = int(input())
print(min(-N % 1000, N % 1000))

Failing test case input:
1361

Expected output:
639


Actual output:
361


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
N = int(input())
print(-N % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
money=int(input('N'))
i=0
while i<=money:
    if i*1000>=money:
        break
    else:
        i+=1
print(i*1000-money)


Failing test case input:
1698

Expected output:
302


Actual output:
N302


Fixed submission (verdict: Accepted):
money=int(input())
i=0
while i<=money:
    if i*1000>=money:
        break
    else:
        i+=1
print(i*1000-money)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
n = int(input())
if n % 1000 == 0:
  print(0)
else:
  print(math.ceil(1900 / 1000) * 1000 - n)

Failing test case input:
3086

Expected output:
914


Actual output:
-1086


Fixed submission (verdict: Accepted):
import math
n = int(input())
if n % 1000 == 0:
  print(0)
else:
  print(math.ceil(n / 1000) * 1000 - n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = int(input())

if a % 1000 == 0:
  print("0")
else:
  print(a % 1000)

Failing test case input:
2807

Expected output:
193


Actual output:
807


Fixed submission (verdict: Accepted):
a = int(input())

if a % 1000 == 0:
  print("0")
else:
  print(1000 - a % 1000)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = 0
if n % 1000:
    print(0)
else:
    a = 1000 - n % 1000
print(a)

Failing test case input:
1361

Expected output:
639


Actual output:
0
0


Fixed submission (verdict: Accepted):
n = int(input())
a = 0
if n % 1000 == 0:
    print(0)
else:
    a = 1000 - n % 1000
    print(a)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
fee = int(input())

pay = fee - (fee % 1000) + 1000
print(pay - fee)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
fee = int(input())

fee = fee % 1000
pay = 1000
if fee == 0: pay = 0
print(pay - fee)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

for i in range(1,11):
    x = 1000 * i - N
    if x < 0:
        continue
    else:
        exit()
ans = x % 1000
print(ans)    

Failing test case input:
3520

Expected output:
480


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())

for i in range(1,11):
    x = 1000 * i - N
    if x < 0:
        continue
    else:
        print(x)
        exit()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
i = int(input())
while (i < 0):
  i -= 1000
print(i)

Failing test case input:
656

Expected output:
344


Actual output:
656


Fixed submission (verdict: Accepted):
i = int(input())
while (i > 0):
  i -= 1000
print(abs(i))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
if n%1000 == 0:
  print(0)

print((int(n/1000)+1)*1000-n)

Failing test case input:
3000

Expected output:
0

Actual output:
0
1000


Fixed submission (verdict: Accepted):
n = int(input())
if n%1000 == 0:
  print(0)
else:
  print(1000 - n%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())

if N/1000==0:
    print(0)
else:
    ans =1000-(N%1000)
    print(int(ans))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N=int(input())
 
if N%1000==0:
    print(0)
else:
    ans =1000-(N%1000)
    print(int(ans))

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
d,q = divmod(n,1000)
if q > 500:
    q = 1000 - q

print(d,q)

Failing test case input:
1698

Expected output:
302


Actual output:
1 302


Fixed submission (verdict: Accepted):
n = int(input())
d,q = divmod(n,1000)

if q == 0:
    print(0)
else:
    print(1000-q)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
x=N%1000
if x==1000:
  print(0)
else:
  print(x)

Failing test case input:
636

Expected output:
364


Actual output:
636


Fixed submission (verdict: Accepted):
N=int(input())
x=N%1000
if x==0:
  print(0)
else:  
  print(1000-x)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



def mp(): return map(int, input().split())
def lmp(): return list(map(int, input().split()))

n = int(input())
print(n%1000)



Failing test case input:
3154

Expected output:
846


Actual output:
154


Fixed submission (verdict: Accepted):



def mp(): return map(int, input().split())
def lmp(): return list(map(int, input().split()))

n = int(input())
print((1000-n%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = 1000 - n%1000
print(ans)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
ans = (1000 - n%1000)%1000
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
while n >= 1000:
    n -= 1000
print(n)    


Failing test case input:
636

Expected output:
364


Actual output:
636


Fixed submission (verdict: Accepted):
n = int(input())
while n > 1000:
    n -= 1000
a = 1000 - n
print(a)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

while(True) : 
    if N >= 1000 : 
        N -= 1000
    else : 
        print(1000-N)
        exit()

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())

while(True) : 
    if N >= 1000 : 
        N -= 1000
    elif N == 0 : 
        print(N)
        exit()
    else : 
        print(1000-N)
        exit()

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
n = n % 1000
print(n)

Failing test case input:
504

Expected output:
496


Actual output:
504


Fixed submission (verdict: Accepted):
n = int(input())
print((1000 - n % 1000) % 1000 )

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def Next(): return input()
def NextInt(): return int(Next())
N = NextInt()*0.001
import math
ans = math.ceil(N)
print(int(ans*1000-N*1000))

Failing test case input:
1021

Expected output:
979


Actual output:
978


Fixed submission (verdict: Accepted):
def Next(): return input()
def NextInt(): return float(Next())


N = round(NextInt()*0.0010, 3)
import math
ans = math.ceil(N)
print(int(ans*1000-N*1000))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
(1000 - N % 1000) % 1000

Failing test case input:
1054

Expected output:
946


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
ans = (1000 - N % 1000) % 1000
print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
number = int(input())
thausand_number = int(number / 1000)
if number % 1000 == 0:
  print(0)
else:
  print(number - (thausand_number + 1) * 1000)

Failing test case input:
3086

Expected output:
914


Actual output:
-914


Fixed submission (verdict: Accepted):
number = int(input())
thausand_number = int(number / 1000)
if number % 1000 == 0:
  print(0)
else:
  print((thausand_number + 1) * 1000 - number)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]





N = ii()

print(min(N%1000, 1000-N%1000))

Failing test case input:
3086

Expected output:
914


Actual output:
86


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]





N = ii()

for i in range(11):
    if 1000 * i >= N:
        print(1000 * i-N)
        exit()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
print(1000-(N%1000))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
print(0 if N%1000==0 else 1000-(N%1000))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
x = 1000-n%1000
print(x if x else 0)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
x = (10000-n)%1000
print(x)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input("金額を入力"))

n=1
kane=1000*n

while True:
    if N<=kane:
        print(kane-N)
        break
    else:
        n+=1
        kane=1000*n

Failing test case input:
504

Expected output:
496


Actual output:
金額を入力496


Fixed submission (verdict: Accepted):
N=int(input())

n=1
kane=1000*n

while True:
    if N<=kane:
        print(kane-N)
        break
    else:
        n+=1
        kane=1000*n

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from sys import stdin

def main():

    input = stdin.readline

    N = int(input())

    print(N % 1000)

if __name__ == "__main__":
    main()

Failing test case input:
975

Expected output:
25


Actual output:
975


Fixed submission (verdict: Accepted):
from sys import stdin

def main():

    input = stdin.readline

    N = int(input())

    ans = (1000 - N % 1000) % 1000

    print(ans)

if __name__ == "__main__":
    main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
n=int(input())
for i in range(10):
  n=n-1000
  if n<0:
    print(1000-(n+1000))
    sys.exit()

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
import sys
n=int(input())
for i in range(10):
  n=n-1000
  if n<=0:
    print(1000-(n+1000))
    sys.exit()
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
price = int(input())
if price == 0:
    print(0)
else:
    print(1000-(price%1000))


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
price = int(input())
if price % 1000 == 0:
    print(0)
else:
    print(1000-(price%1000))

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
print(1000-n%1000)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
print((1000-n)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import datetime
import string
import re
import math

N = int(input())
while N >= 1000:
    N -= 1000

print(N)


Failing test case input:
2807

Expected output:
193


Actual output:
807


Fixed submission (verdict: Accepted):
import datetime
import string
import re
import math

N = int(input())
while N > 1000:
    N -= 1000

print(1000 - N)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = int(input())

if a < 1000:
  print(1000 - a)
else:
  a = a % 1000
  print(1000 - a)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
a = int(input())

b = a % 1000

if b == 0:
  print(0)
else:
  print(1000 - b)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
if __name__ == "__main__":
    num = int(input())

    while True:
      new_num = num - 1000
      if new_num < 0:
        ans = new_num * -1
        break
      num = new_num
    print(ans)



Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
    num = int(input())

    while True:
      new_num = num - 1000
      if new_num <= 0:
        ans = new_num * -1
        break
      num = new_num
    print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys

DEBUG = False
if DEBUG:
    f=open("202007_1st/A_input.txt")
else:
    f=sys.stdin
N=int(f.readline())
print(N%1000)
f.close()

Failing test case input:
3086

Expected output:
914


Actual output:
86


Fixed submission (verdict: Accepted):
import sys

DEBUG = False
if DEBUG:
    f=open("202007_1st/A_input.txt")
else:
    f=sys.stdin
N=int(f.readline().strip())
R=N%1000
if R==0:
    print(R)
else:
    print(1000-(N%1000))
f.close()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
while N >= 1000:
    N -= 1000
print(1000-N)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
while N > 1000:
    N -= 1000
print(1000-N)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
while x<=0:
  x -=1000
print(abs(x))

Failing test case input:
699

Expected output:
301


Actual output:
699


Fixed submission (verdict: Accepted):
x = int(input())
while x > 0:
    x -= 1000
print(abs(x))