Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
l,s = [],[]
for i in range(5):
    num = int(input())
    l.append(num)
    s.append(num%10)

res = 0

s = list(set(s))
if 0 in s:
    s.remove(0)

for i in l:
    if i%10!=0:
        res += (i+10)//10*10
    else:
        res += i
else:
    tmp = min(s)
    print(res-(10-tmp)) if len(s)!=0 else print(res)

Fixed submission:
l,s = [],[]
for i in range(5):
    num = int(input())
    l.append(num)
    if num%10!=0:
        s.append(num%10)

res = 0

for i in l:
    if i%10!=0:
        res += (i+10)//10*10
    else:
        res += i
else:
    if len(s) != 0:
        tmp = min(s)
    else:
        tmp = 10
    print(res-(10-tmp))

Buggy python submission (verdict: Runtime Error):
l,s = [],[]
for i in range(5):
    num = int(input())
    l.append(num)
    s.append(num%10)
res = 0
s = list(set(s))
if 0 in s:
    s.remove(0)
for i in l:
    if i%10!=0:
        res += (i+10)//10*10
    else:
        res += i
else:
    print(res-(10-min(s)))

Fixed submission:
l,s = [],[]
for i in range(5):
    num = int(input())
    l.append(num)
    if num%10!=0:
        s.append(num%10)

res = 0

for i in l:
    if i%10!=0:
        res += (i+10)//10*10
    else:
        res += i
else:
    if len(s) != 0:
        tmp = min(s)
    else:
        tmp = 10
    print(res-(10-tmp))

Buggy python submission (verdict: Runtime Error):
l,s = [],[]
for i in range(5):
    num = int(input())
    l.append(num)
    s.append(num%10)
res = 0
s = list(set(s))
if 0 in s:
    s.remove(0)
for i in l:
    res += ((i+9)//10*10)
else:
    print(res-(10-min(s)))

Fixed submission:
l,s = [],[]
for i in range(5):
    num = int(input())
    l.append(num)
    if num%10!=0:
        s.append(num%10)

res = 0

for i in l:
    if i%10!=0:
        res += (i+10)//10*10
    else:
        res += i
else:
    if len(s) != 0:
        tmp = min(s)
    else:
        tmp = 10
    print(res-(10-tmp))
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
X = list(map(int,input().split()))

d = []

X.sort()
for i in range(M-1):
    d.append((X[i+1]-X[i]))
else:
    d.sort()
    d = d[::-1]

res = sum(d)
for i in range(N-1):
    res -= d[i]
else:
    print(res)



Fixed submission:
N,M = map(int,input().split())
X = list(map(int,input().split()))

d = []

X.sort()
for i in range(M-1):
    d.append(X[i+1]-X[i])
else:
    d.sort()
    d = d[::-1]

res = sum(d) - sum(d[0:N-1])

print(res)
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=[]

for I in range(n):
    l.append(int(input())
else:
    print(int(sum(l)-max(l)/2))

Fixed submission:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
else:
    print(sum(l)-max(l)//2)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

print((a-1)*(b-1))

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

print((a-1)*(b-1))
Buggy python submission (verdict: Runtime Error):
s = input()
count = 0

for i in s:
    if ord("A") <= ord(i) <= ord("Z"):
        count += 1
else:
    if s[0] == "A" and 2 <= s.index("C") <= len(s)-3 and count == 2:
        print("AC")
    else:
        print("WA")


Fixed submission:
s = input()
count = 0

for i in s:
    if ord("A") <= ord(i) <= ord("Z"):
        count += 1
else:
    if s.count("C") == 0:
        print("WA")
        exit()
    if s[0] == "A" and 2 <= s.index("C") <= len(s)-2 and count == 2:
        print("AC")
    else:
        print("WA")
Buggy python submission (verdict: Runtime Error):
a = int(input())

if a % 2 ==0:
  print(n)
else:
  print(n*2)

Fixed submission:
a = int(input())

if a % 2 ==0:
    print(a)
else:
    print(a*2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
res = 0
for i in range(len(n)):
  res = res + n[i]
  
print(res)

Fixed submission:
n = int(input())
m = str(n)
res = 0
for i in range(len(m)):
  res = res + int(m[i])
if res == 1:
    res *= 10
print(res)
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
d = abs(a[0] - a[2])
d1 = abs(a[0] - a[1])
d2 = abs(a[1] - a[2])
if d <= a[3]:
  print("Yes")
elif d1 <= a[3] or d2 <= a[3]:
  print("Yes")
elif a[0] = a[1] and a[0] = a[2]:
  print("Yes")
else: print("No")

Fixed submission:
a = list(map(int,input().split()))
d = abs(a[0] - a[2])
d1 = abs(a[0] - a[1])
d2 = abs(a[1] - a[2])

if d <= a[3]:
  print("Yes")
elif d1 <= a[3] and d2 <= a[3]:
  print("Yes")
else: print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c = list(map(int,input().split()))
k = input()

BIG = max(a,b,c)
if BIG == a:
  print(BIG*(2**k)+b+c)
elif BIG == b:
  print(BIG*(2**k)+a+c)
else:
  print(BIG*(2**k)+a+b)


Fixed submission:
a,b,c = list(map(int,input().split()))
k = int(input())

BIG = max(a,b,c)
if BIG == a:
  print(BIG*(2**k)+b+c)
elif BIG == b:
  print(BIG*(2**k)+a+c)
else:
  print(BIG*(2**k)+a+b)
Buggy python submission (verdict: Runtime Error):
a,b = list(map(int,input().split()))
all_ = []
while a:
  all_.append(int(input()))
else:
  num_a = a
  res_a = b - sum(all_)
  minimum = min(all_)
  num_b = res_a / minimum
  print(num_a + num_b)
  


Fixed submission:
a,b = list(map(int,input().split()))
all_ = []

for i in range(a):
    usr = int(input())
    all_.append(usr)
else:
    num_a = a
    res_a = b - sum(all_)
    minimum = min(all_)
    num_b = res_a / minimum
    print(int(num_a + num_b))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if a> b:
  num1 = b
else:
  num1 = a
if c > d:
  num2 = d
else:
  num2 = c
print(nu1+num2)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if a> b:
  num1 = b
else:
  num1 = a
if c > d:
  num2 = d
else:
  num2 = c
print(num1+num2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
d,x = list(map(int,input().split()))
res = 0
for i in range(n):
  res = res + int((d+i-1)/i)  

print(res+x)



Fixed submission:
n = int(input())
d,x = list(map(int,input().split()))
res = 0
for i in range(n):
  a = int(input())
  res = res + int((d+a-1)/a)  

print(res+x)
Buggy python submission (verdict: Runtime Error):
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))

print(c1[0],c2[1],c3[2])

Fixed submission:
c1 = str(input())
c2 = str(input())
c3 = str(input())
res = ""

res += c1[0] + c2[1] + c3[2]

print(res)
Buggy python submission (verdict: Runtime Error):
l = ['P','W','G','Y']
l_ = [0,0,0,0]

n = int(input)
s = list(map(int,input()))

for i in range(len(s)):
  if s[i] == 'P':
    l_[0] += 1
  elif s[i] == 'W':
    l_[1] += 1
  elif s[i] == 'G':
    l_[2] += 1
  else:
    l_[3] += 1
else:
  for i in range(4):
    if l_[i] == 0:
      print("Three")
      break
    else:
      print("Four")
      break

Fixed submission:
if __name__ == "__main__":
    n = int(input())
    s = list(set(list(map(str,input().split()))))
    print("Four") if len(s) == 4 else print("Three")
Buggy python submission (verdict: Runtime Error):
s = input()
s[3] = "8"
print(s)

Fixed submission:
s = input()
s = s.replace("2017","2018")
print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a,b,c = list(map(int,input().split()))
num = 0

while True:
    if a%2 == 0 and b%2 == 0 and c%2 == 0:
        a = a/2
        b = b/2
        c = c/2
        num += 1
    else:
        print(num)
        break

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
num = 0
flg = 1

while True:
    for i in range(len(l)):
        #print(i,num)
        if l[i] % 2 == 0:
            l[i] = l[i]/2
        else:
            print(num)
            flg = 0
            break
    if flg == 0:
        break
    else:
        num += 1
        continue
Buggy python submission (verdict: Runtime Error):
a = list(map(str,input().split()))
b = list(a)

if (a[0] == a[1] and a[1] == a[2]) or (a[1] == a[2] and a[2] == a[3]):
  print("Yes")
else:
  print("No")

Fixed submission:
a = str(input())
b = list(a)

if (b[0] == b[1] and b[1] == b[2]) or (b[1] == b[2] and b[2] == b[3]):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
x,y = str(input()),str(input())

def rep(a):
  if a == 'A':
    a = 10
  elif a == "B":
    a = 11
  elif a == "C":
    a = 12  
  elif a == "D":
    a = 13
  elif a == "E":
    a = 14
  elif a == "F":
    a = 15
  return None
    
rep(x)
rep(y)

if x < y:
  print("<")
elif x > y:
  print(">")
else:
  print("=")



Fixed submission:
x,y = map(str,input().split())

if ord(x) > ord(y):
  print(">")
elif ord(x) < ord(y):
  print("<")
else:
  print("=")
Buggy python submission (verdict: Runtime Error):
str = input()

res = str[0:1] + str(len(str)-2) +str[0:1:-1]
print(res)

Fixed submission:
s = input()

res = s[0] + str(len(s)-2) + s[len(s)-1]

print(res)
Buggy python submission (verdict: Runtime Error):
a = int(input())
l = list(map(int,input().split()))

le,ri = 0,sum(l)
ans = 10**10
for i in range(len(l)-1):
    le += l[i]
    ri -= l[i]
    ans = min(ans,abs(le-ri))
else:
    print(min(ans))

Fixed submission:
a = int(input())
l = list(map(int,input().split()))

le,ri = 0,sum(l)
ans = []
for i in range(len(l)-1):
    le += l[i]
    ri -= l[i]
    ans.append(abs(le-ri))
else:
    print(min(ans))

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

le,ri = 0,sum(l)
ans = 10**10
for i in range(len(l)-1):
    le += l[i]
    ri -= l[i]
    min(ans,abs(le-ri))
else:
    print(min(ans))

Fixed submission:
a = int(input())
l = list(map(int,input().split()))

le,ri = 0,sum(l)
ans = []
for i in range(len(l)-1):
    le += l[i]
    ri -= l[i]
    ans.append(abs(le-ri))
else:
    print(min(ans))
Buggy python submission (verdict: Runtime Error):
a = map(int,input().split())
b = a[1] - a[2]

if b > a[0]:
  print("dangerous")
elif b > 0:
  print("delicious")
else: 
  print("safe")

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


def eat(x,a,b):
  if a - b >= 0:
    print("delicious")
  elif x + a - b < 0:
    print("dangerous")
  else:
    print("safe")
    
eat(x,a,b)

Buggy python submission (verdict: Runtime Error):
a = map(int,input().split())
b = a[1] - a[2]

if b > a[0]:
  print("dangerous")
elif b > 0:
  print("delicious")
else: 
  print("safe")

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


def eat(x,a,b):
  if a - b >= 0:
    print("delicious")
  elif x + a - b < 0:
    print("dangerous")
  else:
    print("safe")
    
eat(x,a,b)

Buggy python submission (verdict: Runtime Error):
a = map(int,input().sprit())
b = a[1] - a[2]

if b > a[0]:
  print("dangerous")
elif b > 0:
  print("delicious")
else: 
  print("safe")

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


def eat(x,a,b):
  if a - b >= 0:
    print("delicious")
  elif x + a - b < 0:
    print("dangerous")
  else:
    print("safe")
    
eat(x,a,b)

Buggy python submission (verdict: Runtime Error):
a = map(int,input(),sprit())
b = a[1] - a[2]

if b > a[0]:
  print("dangerous")
elif b > 0:
  print("delicious")
else: 
  print("safe")

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


def eat(x,a,b):
  if a - b >= 0:
    print("delicious")
  elif x + a - b < 0:
    print("dangerous")
  else:
    print("safe")
    
eat(x,a,b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))

zero = l[0]
count = 1
th = [zero]

def r(index,throw):
    global l
    now = l[index-1]
    # print(now,throw)
    if (now in throw) or (2 not in l):
        print(-1)
        return

    if now != 2:
        throw.append(now)
        r(now,throw)
    else:
        print(len(throw)+2)
        return

r(zero,th)


Fixed submission:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))

zero = l[0]
count = 1

for i in range(n):
    #print("c:",count)
    if zero != 2:
        count += 1
        zero = l[zero-1]
    else:
        print(count)
        exit()
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if a + b >= 10:
  print("error")
else:
  print(a+b)

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

if a + b >= 10:
  print("error")
else:
  print(a+b)

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

if a + b >= 10:
  print("error")
else:
  print(a+b)

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

if a + b >= 10:
  print("error")
else:
  print(a+b)

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

if a + b >= 10:
  print("error")
else:
  print(a+b)

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

if a + b >= 10:
  print("error")
else:
  print(a+b)
Buggy python submission (verdict: Runtime Error):
s1,s2,s3 = list(map(str,input().split()))
res = ""

res.append(s1[0].upper())
res.append(s2[0].upper())
res.append(s3[0].upper())

print(res)

Fixed submission:
a,b,c = map(str,input().split())

print(a[0].upper() + b[0].upper() + c[0].upper())

Buggy python submission (verdict: Runtime Error):
s1,s2,s3 = list(map(int,input().split()))
res = ""

res.append(s1[0].upper())
res.append(s2[0].upper())
res.append(s3[0].upper())

print(res)

Fixed submission:
a,b,c = map(str,input().split())

print(a[0].upper() + b[0].upper() + c[0].upper())
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input()split()))

b = a[0] + a[1]
if b > 24:
  b -= 24
print(b)

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

b = a[0] + a[1]
if b >= 24:
  b -= 24
print(b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
res = 1

for i in range(1,n+1):
    res *= i

print(res%1000000007)

Fixed submission:
n = int(input())
res = 1
for i in range(1,n+1):
    res *= i
    res %= (10**9+7)
else:
    print(res)
Buggy python submission (verdict: Runtime Error):
# this is cumulative
n = int(input())
s = input()

point = 0
cum_sum = []

for i in s:
    if i == "I":
        point += 1
    else:
        point -= 1
    cum_sum.append(point)
else:
    print(max(cum_sum,0))
    


Fixed submission:
n = int(input())
s = str(input())

num = 0
res = 0

for i in range(len(s)):
  if s[i] == 'I':
    num += 1
  else:
    num -= 1
  if num > res:
    res = num

print(res)

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

num = 0
res = 0

for i in range(len(s)):
  if str[i] == 'I':
    num += 1
  else:
    num -= 1
  if num > res:
    res = num

print(res)

Fixed submission:
n = int(input())
s = str(input())

num = 0
res = 0

for i in range(len(s)):
  if s[i] == 'I':
    num += 1
  else:
    num -= 1
  if num > res:
    res = num

print(res)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
res = 0

for i in range(n):
  sel = a[i]
  if a[sel] == i:
    res += 1
else:
  print(res/2)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
res = 0

for i in range(n):
  sel = a[i] -1
  if a[sel] == i+1:
    res += 1
else:
  print(int(res/2))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
res = 0

for i in range(n):
  sel = a[i]
  if a[sel] = i:
    res += 1
else:
  print(res/2)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
res = 0

for i in range(n):
  sel = a[i] -1
  if a[sel] == i+1:
    res += 1
else:
  print(int(res/2))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())

print((a+b)*h/2)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())


print(int((a+b)*h/2))

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

print((a+b)*h/2)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())


print(int((a+b)*h/2))
Buggy python submission (verdict: Runtime Error):
s = input()
#l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
l = []
roll = ord('z')-ord('a')

for i in range(roll):
    l.append(0)

for i in range(len(s)):
    num = ord(s[i])
    l[num-97] += 1
    #print(num)

for i in range(roll):
    if l[i]%2 != 0:
        print("No")
        break
else:
    print("Yes")


Fixed submission:
s = input()
#l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
l = []
roll = ord('z')-ord('a')+1

for i in range(roll):
    l.append(0)

for i in range(len(s)):
    num = ord(s[i])
    l[num-97] += 1
    #print(num)

for i in range(roll):
    if l[i]%2 != 0:
        print("No")
        break
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
s = input()
#l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
l = []
roll = ord('z')-ord('a')

for i in range(roll):
    l.append(0)

for i in range(len(s)):
    num = ord(s[i])
    l[num-97] += 1
    #print(num)

for i in range(roll):
    if l[i]%2 != 0:
        print("No")
        exit()
else:
    print("Yes")

Fixed submission:
s = input()
#l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
l = []
roll = ord('z')-ord('a')+1

for i in range(roll):
    l.append(0)

for i in range(len(s)):
    num = ord(s[i])
    l[num-97] += 1
    #print(num)

for i in range(roll):
    if l[i]%2 != 0:
        print("No")
        break
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
ri = lambda: map(int, input().split())

N, M = ri()
H = list(ri())
G = [[0]*N for _ in range(N)]
for _ in range(M):
    a, b = ri()
    G[a-1][b-1] = H[b-1]
    G[b-1][a-1] = H[a-1]

T = [max(r) for r in G]
print(sum(1 for i, h in enumerate(T) if h == 0 or h < H[i]))


Fixed submission:
ri = lambda: map(int, input().split())

N, M = ri()
H = list(ri())
T = [0]*N
for _ in range(M):
    a, b = ri()
    T[a-1] = max(T[a-1], H[b-1])
    T[b-1] = max(T[b-1], H[a-1])

print(sum(1 for i, h in enumerate(T) if h == 0 or h < H[i]))

Buggy python submission (verdict: Time Limit Exceeded):
ri = lambda: map(int, input().split())

N, M = ri()
H = list(ri())
G = [[0]*N for _ in range(N)]
for _ in range(M):
    a, b = ri()
    G[a-1][b-1] = H[b-1]
    G[b-1][a-1] = H[a-1]

T = [max(r) for r in G]
print(sum(1 for i, h in enumerate(T) if h == 0 or h < H[i]))


Fixed submission:
ri = lambda: map(int, input().split())

N, M = ri()
H = list(ri())
T = [0]*N
for _ in range(M):
    a, b = ri()
    T[a-1] = max(T[a-1], H[b-1])
    T[b-1] = max(T[b-1], H[a-1])

print(sum(1 for i, h in enumerate(T) if h == 0 or h < H[i]))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

A = list(enumerate(A, start=1))
A.sort(reverse=True, key=lambda x: x[1])

dp = [[0]*(N + 1) for _ in range(N + 1)]
for j in range(N):
    dp[0][j+1] = dp[0][j] + A[j][1]*((N - j) - A[j][0])
for i in range(N):
    dp[i+1][0] = dp[i][0] + A[i][1]*(A[i][0] - (i + 1))
    for j in range(N - i - 1):
        dp[i+1][j+1] = max(dp[i+1][j] + A[i+j+1][1]*((N - j) - A[i+j+1][0]),
                           dp[i][j+1] + A[i+j+1][1]*(A[i+j+1][0] - (i + 1)))
print(max(dp[i][N-i] for i in range(N+1)))


Fixed submission:
N = int(input())
A = list(map(int, input().split()))

p = list(range(N))
p.sort(key=lambda i: A[i], reverse=True)

dp = [[0]*(N + 1) for _ in range(N + 1)]
for i in range(N):
    for j in range(i + 1):
        pi = p[i]
        dp[i+1][j] = max(dp[i+1][j], dp[i][j] + A[pi]*(N - i + j - 1 - pi))
        dp[i+1][j+1] = dp[i][j] + A[pi]*(pi - j)
print(max(dp[N]))
Buggy python submission (verdict: Runtime Error):
ans=0

n,m=map(input().split())
if n > 1:
	for i in range(1,n):
		ans += i

if m > 1:
	for i in range(1,m):
		ans += i

print(ans)

Fixed submission:
ans=0

n,m=map(int,input().split())
if n > 1:
	for i in range(1,n):
		ans += i

if m > 1:
	for i in range(1,m):
		ans += i

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
m = int(input())
c = 0

for i in range(m):
    c = c + i

print(c)

Fixed submission:
m = int(input())

print(m*(m-1)//2)

Buggy python submission (verdict: Time Limit Exceeded):
m = int(input())
c = 0

for i in range(m):
    c = c + i

print(c)

Fixed submission:
m = int(input())

print(m*(m-1)//2)
Buggy python submission (verdict: Runtime Error):
input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

print(s)

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu)


Fixed submission:
input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu))

Buggy python submission (verdict: Runtime Error):
input_line = str(input())
s = []

for i in range(len(input_line)):
  if input_line == '9':
    s.append('1')
  elif input_line == '1':
    s.append('9')
  else:
    s.append(input_line[i])

for x in s:
    mojiretu += x
    
print(mojiretu)


Fixed submission:
input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu))
Buggy python submission (verdict: Runtime Error):
input_line = input()
n = int(input_line / 111)
print(111 + n * 111)

Fixed submission:
input_line = input()
n = int(int(input_line) / 111)
if int(input_line) % 111 == 0:
  print(n *111)
else:
  print(111 + n *111)

Buggy python submission (verdict: Runtime Error):
input_line = input()
n = int(input_line / 111)
print(n*111)

Fixed submission:
input_line = input()
n = int(int(input_line) / 111)
if int(input_line) % 111 == 0:
  print(n *111)
else:
  print(111 + n *111)

Buggy python submission (verdict: Runtime Error):
str = input()
n = str / 111

print(n*111)

Fixed submission:
input_line = input()
n = int(int(input_line) / 111)
if int(input_line) % 111 == 0:
  print(n *111)
else:
  print(111 + n *111)
Buggy python submission (verdict: Runtime Error):
number = int(input())

ac = 0
wa = 0
tle = 0
re = 0
for i in range(number):
  character = input()
  if character == 'AC':
    ac += 1
  if character == 'WA':
    wa += 1
  if character == 'TLE':
    tle += 1
  if character == 'RE':
    re += 1

print("AC x " + ac)
print("WA x " + wa)
print("TLE x " + tle)
print("RE x " + re)

Fixed submission:
number = int(input())
 
ac = 0
wa = 0
tle = 0
re = 0
for i in range(number):
  character = input()
  if character == 'AC':
    ac += 1
  if character == 'WA':
    wa += 1
  if character == 'TLE':
    tle += 1
  if character == 'RE':
    re += 1
 
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))
Buggy python submission (verdict: Runtime Error):
n = int(input())
 
if n % 1000 == 0 :
    a = n / 1000
else :
    int(a) = n / 1000 + 1
 
b = a * 1000
answer = int(b - n)
 
print(answer)

Fixed submission:
n = int(input())
 
if n % 1000 == 0 :
    a = n / 1000
else :
    a = int(n / 1000 + 1)
 
b = a * 1000
answer = int(b - n)
 
print(answer)

Buggy python submission (verdict: Runtime Error):
n = int(input())
for s in range(1,10) :
    if n <= s*1000 :
       x = s*1000 - n 
       break()
print(x)

Fixed submission:
n = int(input())
 
if n % 1000 == 0 :
    a = n / 1000
else :
    a = int(n / 1000 + 1)
 
b = a * 1000
answer = int(b - n)
 
print(answer)

Buggy python submission (verdict: Runtime Error):
n = int(input())
for s in range(1,10) :
    if n <= s*1000 :
       x = s*1000 - n 
       
print(x)

Fixed submission:
n = int(input())
 
if n % 1000 == 0 :
    a = n / 1000
else :
    a = int(n / 1000 + 1)
 
b = a * 1000
answer = int(b - n)
 
print(answer)

Buggy python submission (verdict: Runtime Error):
n = int(input())
for s in range(1,10) :
    if n <= s*1000 :
       x = s*1000 - n 
       break
print(x)

Fixed submission:
n = int(input())
 
if n % 1000 == 0 :
    a = n / 1000
else :
    a = int(n / 1000 + 1)
 
b = a * 1000
answer = int(b - n)
 
print(answer)

Buggy python submission (verdict: Runtime Error):
n = int(input())
for s in range(1,10) :
    if n <= s*1000 :
        x = s*1000 - n 
        break
print(x)

Fixed submission:
n = int(input())
 
if n % 1000 == 0 :
    a = n / 1000
else :
    a = int(n / 1000 + 1)
 
b = a * 1000
answer = int(b - n)
 
print(answer)