Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
 
PI = math.pi
A=int(input())
B=int(input())
H=int(input())
M=int(input())
 
arg_a = (H + M/60) / 12.0 * 360
arg_b = M / 60.0 * 360
 
 
C = (A*A + B*B - 2*A*B* math.cos((arg_a-arg_b)/360*2*PI)) ** (1/2)
print(C)

Fixed submission:
import math
 
PI = math.pi
A, B, H, M = map(int, input().split())
 
arg_a = (float(H) + float(M)/60) / 12.0 * 360
arg_b = float(M) / 60.0 * 360
 
 
C = math.sqrt(A*A + B*B - 2*A*B* math.cos((arg_a-arg_b)/360*2*PI))
print(C)

Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
B = int(input())
H = int(input())
M = int(input())
t = H * 60 + M
CC = A**2 + B **2 - 2 * A * B * math.cos(((math.pi/60)-(math.pi/360))*t)
print(CC ** (1/2))

Fixed submission:
import math
 
PI = math.pi
A, B, H, M = map(int, input().split())
 
arg_a = (float(H) + float(M)/60) / 12.0 * 360
arg_b = float(M) / 60.0 * 360
 
 
C = math.sqrt(A*A + B*B - 2*A*B* math.cos((arg_a-arg_b)/360*2*PI))
print(C)

Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
B = int(input())
H = int(input())
M = int(input())
t = H * 60 + M
CC = A**2 + B **2 - 2 * A * B * math.cos(((math.pi/60)-(math.pi/360))*t)
print(CC ** (1/2))

Fixed submission:
import math
 
PI = math.pi
A, B, H, M = map(int, input().split())
 
arg_a = (float(H) + float(M)/60) / 12.0 * 360
arg_b = float(M) / 60.0 * 360
 
 
C = math.sqrt(A*A + B*B - 2*A*B* math.cos((arg_a-arg_b)/360*2*PI))
print(C)

Buggy python submission (verdict: Runtime Error):
import math
A = int(input())
B = int(input())
H = int(input())
M = int(input())
 
t = H * 60 + M
CC = A**2 + B **2 - 2 * A * B * math.cos(((pi/60)-(pi/360))*t)
print(c ** (1/2))

Fixed submission:
import math
 
PI = math.pi
A, B, H, M = map(int, input().split())
 
arg_a = (float(H) + float(M)/60) / 12.0 * 360
arg_b = float(M) / 60.0 * 360
 
 
C = math.sqrt(A*A + B*B - 2*A*B* math.cos((arg_a-arg_b)/360*2*PI))
print(C)

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
H = int(input())
M = int(input())

t = H * 60 + M
CC = A**2 + B **2 - 2 * A * B * math.cos(((pi/60)-(pi/360))*t)
print(c ** (1/2))

Fixed submission:
import math
 
PI = math.pi
A, B, H, M = map(int, input().split())
 
arg_a = (float(H) + float(M)/60) / 12.0 * 360
arg_b = float(M) / 60.0 * 360
 
 
C = math.sqrt(A*A + B*B - 2*A*B* math.cos((arg_a-arg_b)/360*2*PI))
print(C)
Buggy python submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())

if K<=A:
  print(str(K))
elif k<=A+B:
  print(str(A))
else:
  print(str(A-(C-(k-(A+B))))


Fixed submission:
A,B,C,K = map(int,input().split())
 
if K <= A:
    print(str(K))
elif K <= A + B:
    print(str(A))
else:
    print(str(A - (C - (A + B + C - K))))

Buggy python submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())

if K<=A:
  print(K)
elif k<=A+B:
  print(A)
else:
  print(A-(C-(k-(A+B)))


Fixed submission:
A,B,C,K = map(int,input().split())
 
if K <= A:
    print(str(K))
elif K <= A + B:
    print(str(A))
else:
    print(str(A - (C - (A + B + C - K))))

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
K = int(input())

if K<=A:
  print(K)
elif k<=A+B:
  print(A)
else:
  print(A-(C-(k-(A+B)))

Fixed submission:
A,B,C,K = map(int,input().split())
 
if K <= A:
    print(str(K))
elif K <= A + B:
    print(str(A))
else:
    print(str(A - (C - (A + B + C - K))))
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
 
P = [0 for i in range(N)]
m = 0
for i in range(K):
  a = int(input())
  b = list(int,input().split())
  for j in range(a):
    P[b[j]-1] = 1
    j += 1
    
for l in range(N):
  if P[l] == 0:
    m += 1
    
print(m)


Fixed submission:
S = input()

if S =='ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
 
M = [0]*n
 
for i in range(k):
    d = int(input())
    a = [int(x) for x in input().split()]
    for j in range(d):
        M[a[j]-1] += 1
 
print(M.count(0))

Fixed submission:
S = input()

if S =='ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
 
m = [0]*n
 
for i in range(k):
    d = int(input())
    a = [int(x) for x in input().split()]
    for j in range(d):
        m[a[j]-1] += 1
 
print(m.count(0))


Fixed submission:
S = input()

if S =='ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
 
member = [0]*n
 
for i in range(k):
    d = int(input())
    a = [int(x) for x in input().split()]
    for j in range(d):
        
        member[a[j]-1] += 1
 
print(member.count(0))


Fixed submission:
S = input()

if S =='ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
S = input()

if S ='ABC':
  print('ARC')
else:
  print('ABC')

Fixed submission:
S = input()

if S =='ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
S = input()

if S = "ABC":
  print("ARC")
else:
  print("ABC")

Fixed submission:
S = input()

if S =='ABC':
  print('ARC')
else:
  print('ABC')
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = [map(int,input().split())]
print(max(-1,N-sum(A)))

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
print(max(-1,N-sum(A)))

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())

list = [map(int,input().split())]

if count(list) > N:
  print(-1)
else:
  print(N-count(list))

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
print(max(-1,N-sum(A)))
Buggy python submission (verdict: Runtime Error):
N = str(input())
if str[0] == "7" or str[1] == "7" or str[2] == "7":
  print("Yes")
else:
  print("No")

Fixed submission:
N = str(input())
if N[0] == "7" or N[1] == "7" or N[2] == "7":
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
N = str(input())
if str[0] == 7 or str[1] == 7 or str[2] == 7:
  print("Yes")
else:
  print("No")

Fixed submission:
N = str(input())
if N[0] == "7" or N[1] == "7" or N[2] == "7":
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = input()

k = N // 3
l = N // 5
m = N // 15

sum = (N * (N + 1) / 2) - (3 * (-1 + 3**k)/2) - (5 * (-1 + 5**l)/4) + (15 * (-1 + 15**k)/14)
print(sum)

Fixed submission:
N = int(input())
 
k = N // 3
l = N // 5
m = N // 15
 
sum = (N * (N + 1) / 2) - (3* k * (k + 1) / 2) - (5* l * (l + 1) / 2) + (15* m * (m + 1) / 2)
print(int(sum))
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A >= 13:
  print(B)
elif A>=6 and A<=12:
  print(B/2)
elif: A<=5:
  print(0)


Fixed submission:
A,B = map(int,input().split())
if A >= 13:
  print(B)
elif A>=6 and A<=12:
  print(int(B/2))
elif A<=5:
  print(0)
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
S = input()
print(S[:k-1] + S[K-1].lower() + S[k-2:])


Fixed submission:
N,K = map(int,input().split())
S = input()
print(S[:K-1] + S[K-1].lower() + S[K:])
Buggy python submission (verdict: Runtime Error):
li = list(map(int, input().split(" ")))
print(f"{li[2]} {li[0]} {li[1]}")

Fixed submission:
import numpy as np  

li = np.array(input().split(" "), dtype=np.int)
li[0], li[1] = li[1], li[0]
li[0], li[2] = li[2], li[0]

print(li[0], li[1], li[2])

Buggy python submission (verdict: Runtime Error):
li = input().split(" ")
print(f"{li[2]} {li[0]} {li[1]}")

Fixed submission:
import numpy as np  

li = np.array(input().split(" "), dtype=np.int)
li[0], li[1] = li[1], li[0]
li[0], li[2] = li[2], li[0]

print(li[0], li[1], li[2])

Buggy python submission (verdict: Runtime Error):
import numpy as np  

li = np.array(input().split(" "), dtype=np.int)
li[0], li[1] = li[1], li[0]
li[0], li[2] = li[2], li[0]

print(li[0], li[1], li[2])

Fixed submission:
import numpy as np  

li = np.array(input().split(" "), dtype=np.int)
li[0], li[1] = li[1], li[0]
li[0], li[2] = li[2], li[0]

print(li[0], li[1], li[2])
Buggy python submission (verdict: Runtime Error):
import numpy as np

info = np.array(input().split(" "), dtype="int64")
o = info[1] + info[2]
if o == 0:
    print(0)
else:
    q, mod = divmod(info[0], o)
    if mod > info[1]:
        print((q+1)* info[1])
    else:
        print(q*info[1] + mod)

Fixed submission:
s = list(input())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
import numpy as np
s = np.array(list(input()))
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

Fixed submission:
s = list(input())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
import numpy as np
s = np.array(list(input()))
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

Fixed submission:
s = list(input())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
import numpy as np
s = np.array(input().split())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

Fixed submission:
s = list(input())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
import numpy as np

info = np.array(input().split(" "), dtype="int64")
o = info[1] + info[2]
if o == 0:
    print(0)
else:
    q, mod = divmod(info[0], o)
    if mod > info[1]:
        print((q+1)* info[1])
    else:
        print(q*info[1] + mod)

Fixed submission:
inf = input().split()
info = list(map(int, inf))
o = info[1] + info[2]
if o == 0:
    print(0)
else:
    q, mod = divmod(info[0], o)
    if mod > info[1]:
        print((q+1)* info[1])
    else:
        print(q*info[1] + mod)
Buggy python submission (verdict: Runtime Error):
import numpy as np

color = input().split(" ")
count = np.array(input().split(" "), dtype="int64")
choose = input()

a = color.index(choose)
count[a] -= 1
print(f"{count[0]} {count[1]}")

Fixed submission:
import numpy as np
 
color = input().split(" ")
count = np.array(input().split(" "), dtype="int64")
choose = input()
 
a = color.index(choose)
count[a] -= 1
print(count[0], end=" ")
print(count[1])
Buggy python submission (verdict: Runtime Error):
from numba inmport 

@jit
def do():
  data = input().split()
  monsters = int(data[0])
  smash = int(data[1])
 
  mon_str = input().split()
  mon_str = [int(b) for b in mon_str]
  count = 0
 
  for i in range(smash):
      try:
          enemy = mon_str.index(max(mon_str))
          del mon_str[enemy]
    
      except ValueError:
          pass
  print(sum(mon_str))
 
do()

Fixed submission:
data = input().split()
strengh = int(data[0])
attack = int(data[1])
count = 0

while strengh > 0:
    strengh -= attack
    count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
D, T, S = map(int, input().split)

if S*T >= D:
  print("Yes")
else:
  print("No")

Fixed submission:
D, T, S = map(int, input().split())

if S*T >= D:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
D, T, S = map(int, input(),split)

if S*T >= D:
  print("Yes")
else:
  print("No")

Fixed submission:
D, T, S = map(int, input().split())

if S*T >= D:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
a = 10**9+7

ans = 0

for i in range(N):
    b = 0
    for j in range(i+1,N):
        b += A[j]
    b = b % a
    ans += A[i]*b

ans = ans % a
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
a = 10**9+7
sumA = sum(A)

ans = 0

for i in range(N):
    sumA -= A[i]
    ans += A[i] * sumA
    ans %= a
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
A = list(map(int, input().split()))
a = 10**9+7

A = np.mod(A,a)

ans = 0

for i in range(N):
    for j in range(i+1,N):
        ans += A[i]*A[j]

ans = ans % a
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
a = 10**9+7
sumA = sum(A)

ans = 0

for i in range(N):
    sumA -= A[i]
    ans += A[i] * sumA
    ans %= a
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

ans = 0

for i in range(N):
    for j in range(i+1,N):
        ans += A[i]*A[j]

ans = ans % (10**9+7)
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
a = 10**9+7
sumA = sum(A)

ans = 0

for i in range(N):
    sumA -= A[i]
    ans += A[i] * sumA
    ans %= a
    
print(ans)
Buggy python submission (verdict: Runtime Error):
d,t,s = map(int,input().split())

print("Yes" if s*t >= d else "No)

Fixed submission:
d,t,s = map(int,input().split())
if s*t >= d:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
D,T,S = map(int , input().split().split())

if D > S * T:
  print("no")
  
else:
  print("yes")

Fixed submission:
a,b,c = (int(x) for x in input().split())

if a > b * c:
  print("No")
  
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input(),split())

if (a*b)%2 == 0:
  print("Even")
  
else:
  print("Odd")

Fixed submission:
a,b = map(int, input().split())
 
if (a*b)%2 == 0:
  print("Even")
  
else:
  print("Odd")

Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())

if num (a*b) % 2 == 0:
  print(Even)
  
else:
  print(Odd)

Fixed submission:
a,b = map(int, input().split())
 
if (a*b)%2 == 0:
  print("Even")
  
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
a,b,c = (int(x) for x in input() . split())

print(a + b + c)

Fixed submission:
s = input()
 
print(s.count("1"))
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = [0]*(N)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            num = x*x + y*y + z*z + x*y + y*z + z*x
            if num>N:
                break
            ans[num] = ans[num] + 1
for m in ans:
    print(m)


Fixed submission:
N = int(input())
ans = [0]*(N+1)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            num = x*x + y*y + z*z + x*y + y*z + z*x
            if num>N:
                break
            ans[num] = ans[num] + 1
for m in ans[1:]:
    print(m)

Buggy python submission (verdict: Time Limit Exceeded):
def f(n):
    for x in range(1,n):
        for y in range(1,n-x):
            for z in range(1,n-x-y):
                if x**2 + y ** 2 + z**2 + x*y + y*z + z*x == n:
                    if x == y and y == z:
                        return 1
                    elif x != y and y != z and x != z:
                        return 6
                    else:
                        return 3
                    break



N = int(input())
for x in range(0,N):
    z = f(x+1)
    if z is None:
        z = 0
    print(z)




Fixed submission:
N = int(input())
ans = [0]*(N+1)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            num = x*x + y*y + z*z + x*y + y*z + z*x
            if num>N:
                break
            ans[num] = ans[num] + 1
for m in ans[1:]:
    print(m)

Buggy python submission (verdict: Time Limit Exceeded):
def f(n):
    count = 0
    for x in range(1,n):
        for y in range(1,n-x):
            for z in range(1,n-x-y):
                if x**2 + y ** 2 + z**2 + x*y + y*z + z*x == n:
                    count = count + 1
    return count

N = int(input())
for x in range(0,N):
    print(f(x+1))


Fixed submission:
N = int(input())
ans = [0]*(N+1)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            num = x*x + y*y + z*z + x*y + y*z + z*x
            if num>N:
                break
            ans[num] = ans[num] + 1
for m in ans[1:]:
    print(m)
Buggy python submission (verdict: Runtime Error):
# 入力
N, X, T = input().split()

if N % X == 0:
    cnt = int(N / X)
else:
    cnt = int(N / X + 1)

print(cnt * T)

Fixed submission:
# 入力
N, X, T = input().split()

N = int(N)
X = int(X)
T = int(T)

if N % X == 0:
    cnt = int(N / X)
else:
    cnt = int(N / X + 1)

print(cnt * T)

Buggy python submission (verdict: Runtime Error):
# 入力
N, X, T = input().split()

if N % X == 0:
    cnt = N / X
else:
    cnt = int(N / X + 1)

print(cnt * T)

Fixed submission:
# 入力
N, X, T = input().split()

N = int(N)
X = int(X)
T = int(T)

if N % X == 0:
    cnt = int(N / X)
else:
    cnt = int(N / X + 1)

print(cnt * T)
Buggy python submission (verdict: Runtime Error):
# 入力
X = input()

# 以下に回答を記入
if X >= 30:
    print('Yes')
else:
    print('No')

Fixed submission:
# 入力
X = input()

# 以下に回答を記入
X = int(X)

if X >= 30:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
# 入力
X = input()

# 以下に回答を記入
if X >= 30:
    print('Yes')
else:
    print('No')

Fixed submission:
# 入力
X = input()

# 以下に回答を記入
X = int(X)

if X >= 30:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
n = input()
n = int(n)

val_list = input().split()
answer = 0
for i, val in enumerate(val_list):
    if i == 0:
        answer = int(val)
    else:
        answer = answer * int(val)

if answer > 10 ** 18:
    print(-1)
else:
    print(answer)


Fixed submission:
a, b = input().split()
a = int(a)
b = int(b)

print(a * b)

Buggy python submission (verdict: Runtime Error):
n = input()
n = int(n)

val_list = input().split()
answer = 0
for i, val in enumerate(val_list):
    if i == 0:
        answer = int(val)
    else:
        answer = answer * int(val)

if answer > 10 ** 18:
    print(-1)
else:
    print(answer)


Fixed submission:
a, b = input().split()
a = int(a)
b = int(b)

print(a * b)

Buggy python submission (verdict: Runtime Error):
n = input()
n = int(n)

val_list = input().split()
answer = 0
for i, val in enumerate(val_list):
    if i == 0:
        answer = int(val)
    else:
        answer = answer * int(val)

if answer > 10**18:
    print(-1)
else:
    print(answer)


Fixed submission:
a, b = input().split()
a = int(a)
b = int(b)

print(a * b)
Buggy python submission (verdict: Runtime Error):
num_val = str(input())

if num_val[len(num_val) - 1] in ['2', '4', '5', '7', '9']:
  print('hon')
  elif num_val[len(num_val) - 1] in ['0', '1', '6', '8']:
    print('pon')
    elif num_val[len(num_val) - 1] in ['3']:
      print('bon')

Fixed submission:
num_val = str(input())

if num_val[len(num_val) - 1] in ['2', '4', '5', '7', '9']:
    print('hon')
elif num_val[len(num_val) - 1] in ['0', '1', '6', '8']:
    print('pon')
elif num_val[len(num_val) - 1] in ['3']:
    print('bon')

Buggy python submission (verdict: Runtime Error):
    num_val = str(input())
     
    if num_val[len(num_val) - 1] in ['2', '4', '5', '7', '9']:
        print('hon')
    elif num_val[len(num_val) - 1] in ['0', '1', '6', '8']:
        print('pon')
    elif num_val[len(num_val) - 1] in ['3']:
        print('bon')

Fixed submission:
num_val = str(input())

if num_val[len(num_val) - 1] in ['2', '4', '5', '7', '9']:
    print('hon')
elif num_val[len(num_val) - 1] in ['0', '1', '6', '8']:
    print('pon')
elif num_val[len(num_val) - 1] in ['3']:
    print('bon')
Buggy python submission (verdict: Time Limit Exceeded):
def insertionSort(A,n,g):
    for i in range(g,n):
        v = A[i]
        j = i-g
        while j>= 0 and A[j] > v:
            A[j+g] = A[j]
            j = j-g
        A[j+g] = v

def shellSort(A,n):
    G=[]
    h = 1
    while h<=n:
        G.append(h)
        h += h*3
    m = len(G)
    G.reverse()
    for i in range(m):
        insertionSort(A,n,G[i])


n,k = map(int,input().split())

R = []

for i in range(n):
    R.append(int(input()))

shellSort(R,n)

minv = 2000000000

for j in range(n-k+1):
    minv = min(minv,R[j+k-1]-R[j])

print(minv)


Fixed submission:
n,k = map(int,input().split())

R = []

for i in range(n):
    R.append(int(input()))

R = sorted(R)
minv = 2000000000

for j in range(n-k+1):
    minv = min(minv,R[j+k-1]-R[j])

print(minv)
Buggy python submission (verdict: Time Limit Exceeded):
def level(x):
    L.append('B')
    if x>1:
        level(x-1)
    else:
        L.append(L0)
    L.append('P')
    if x>1:
        level(x-1)
    else:
        L.append(L0)
    L.append('B')


N,X = map(int,input().split())
count=0
L0 = 'P'
L = []
level(N)
for i in range(X):
    if L[i]=='P':
        count+=1

print(count)


Fixed submission:
N,X = map(int,input().split())
a,p = [1],[1]

for i in range(N):
    a.append(a[i]*2+3)
    p.append(p[i]*2+1)

def f(N,X):
    if N == 0:
        return 0 if X<=0 else 1
    elif X <= 1 + a[N-1]:
        return f(N-1, X-1)
    else:
        return p[N-1]+1+f(N-1,X-2-a[N-1])

print(f(N,X))
Buggy python submission (verdict: Runtime Error):
n = input()

lst = []
res = []

while n > 0:
    lst.append(n%10)
    n //= 10
lst.reverse()

for i in lst:
    if i == 1:
        res.append(9)
    elif i == 9:
        res.append(1)
    else:
        res.append(i)

S = ""

for j in res:
    Str += str(j)

print(S)


Fixed submission:
n = int(input())

lst = []
res = []

while n > 0:
    lst.append(n%10)
    n //= 10
    
lst.reverse()


for i in lst:
    if i == 1:
        res.append(9)
    elif i == 9:
        res.append(1)
    else:
        res.append(i)


S = ""

for j in res:
    S += str(j)

print(S)

Buggy python submission (verdict: Runtime Error):

n = input()

lst = []
res = []

while n > 0:
    lst.append(n%10)
    n //= 10
lst.reverse()

for i in lst:
    if i == 1:
        res.append(9)
    elif i == 9:
        res.append(1)
    else:
        res.append(i)

Str = ""

for j in res:
    Str += str(j)

print(Str)


Fixed submission:
n = int(input())

lst = []
res = []

while n > 0:
    lst.append(n%10)
    n //= 10
    
lst.reverse()


for i in lst:
    if i == 1:
        res.append(9)
    elif i == 9:
        res.append(1)
    else:
        res.append(i)


S = ""

for j in res:
    S += str(j)

print(S)
Buggy python submission (verdict: Runtime Error):
n = input()

lst = [111,222,333,444,555,666,777,888,999]

for i in lst:
    if n <= i:
        print(i)
        break


Fixed submission:
n = int(input())

lst = [111,222,333,444,555,666,777,888,999]

for i in lst:
    if n <= i:
        print(i)
        break
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
mx = 3503
found = False
for i in range(1, mx):
    for j in range(1, mx):
        num = N*i*j
        den = (i*j*4 - N*i - N*j)
        if den == 0:
            continue
        if num%den == 0 and num//den > 0 and num//den < mx:
            print(i,j,num//den)
            found = True
            break
    if found:
        break

Fixed submission:
N = int(input())
mx = 3503
found = False
for i in range(1, mx):
    for j in range(1, mx):
        if i*j*4 % N != 0:
            continue
        den = ((i*j*4)//N) - i - j
        num = i*j
        if den == 0:
            continue
        if num%den == 0 and num//den > 0 and num//den < mx:
            print(i,j,num//den)
            found = True
            break
    if found:
        break
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input())
prin(a*b)

Fixed submission:
a,b = map(int,input().split())
print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
N_list = [int(i) for i in input().split()]
res = 1
for i in range(len(N_list)) :
    res = res * N_list[i]

if (res > 1000000000000000000) :
    print(-1)
else :
    print(res)

Fixed submission:
def main() :

    N = int(input())
    N_list = [int(i) for i in input().split()]
    res = 1

    if (N_list.count(0) > 0) :
        print(0)
        return

    for i in range(len(N_list)) :
        res = res * N_list[i]
        if (res > 1000000000000000000) :
            print(-1)
            return
    
    print(res)

main()
Buggy python submission (verdict: Runtime Error):
A,B = input().split()
A = int(A)
B = float(B*100)

s = A * B
s = s // 100
print(int(s))


Fixed submission:
from decimal import Decimal

A,B = input().split()
A = int(A)
B = int(Decimal(B) * 100)

s = A * B
s = s // 100
print(int(s))