Buggy python submission (verdict: Runtime Error):
N = int(input())
G0, G1, G2, G3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AG':
        G0 += 1
 
    elif Si == 'WA':
        G1  += 1
 
    elif Si == 'TLE':
        G2 += 1
 
    else:
        G3 += 1
 
print('AG x ' + str(G0))
print('WA x ' + str(G1))
print('TLE x ' + str(G2))
print('RE x ' + str(G3))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1
 
    elif Si == 'WA':
        C1  += 1
 
    elif Si == 'TLE':
        C2 += 1
 
    else:
        C3 += 1
 
print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))


Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
N = int(input())
x0,x1,x2,x3=0,0,0,0
for i in range(N):
    Si=input()
    if Si == 'AC':
        x0 = x0+1

    elif Si=='WA':
        x1=x1+1

    elif Si=='TLE':
        x2=x2+1
    
    else:
        x3=x3+1
 
print('AC x' +str(x0))
print('WA x' +str(x1))
print('TLE x'+str(x2))
print('RE x' +str(x3))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import math
 
N=int(input())
if N%1000==0:
  print(0)
elif N<1000:
  N=1000-N
  print(N)
else:
  N=(math.ceil(money/1000))*1000-N
  print(N)
  
  

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import math
 
N=int(input())
if N%1000==0:
  print(0)
else:
  N=(math.ceil(money/1000))*1000-N
  print(int(N))


Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import math
 
N=int(input())
if N%1000==0:
  print(0)
else:
   N=(math.ceil(money/1000))*1000-N
  print(N)

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import math
 
money=int(N)
if money%1000==0:
  print(0)
else:
  money=(math.ceil(money/1000))*1000-money
  print(money)

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import math

money=N
if money%1000==0:
  print(0)
else:
  money=(math.ceil(money/1000))*1000-money
  print(money)

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
if N%1000==0:
  print(0)
else:
  N=math.ceil(N/1000)*1000-N
  print(N)
  

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
N=int(input())
if N/1000==0:
	N=0
else:
	N=(math.ceil(N/1000)+1)*1000-N
print(str(N))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
if N/1000==0:
	N=0
else:
	N=(math.ceil(N/1000)+1)*1000-N
print("N")

Fixed submission:
n = int(input())

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