Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def func(x):
  if ord(x) - ord('a') >= 0:
    print('a')
  else:
    print('A')


def main():
  letter = raw_input()
  func(letter)
  # for x in ['A', 'Z', 'a', 'z']:
  #   func(x)


if __name__ == '__main__':
  main()

Fixed submission:
def func(x):
  if ord(x) - ord('a') >= 0:
    print('a')
  else:
    print('A')


def main():
  letter = input()
  func(letter)
  # for x in ['A', 'Z', 'a', 'z']:
  #   func(x)


if __name__ == '__main__':
  main()
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

c = a*b
if a = c:
  print(1)
elif b = c:
  print(1)
elif c % 2 == 0:
  print(int(c/2))
else:
  print(int(c/2)+1)

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

c = a*b
if a == c:
  print(1)
elif b == c:
  print(1)
elif c % 2 == 0:
  print(int(c/2))
else:
  print(int(c/2)+1)
Buggy python submission (verdict: Runtime Error):
h, a = map(int, input().split())

if h%a == 0:
  input(h/a)
else:
  input(h/a+1)

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

if h%a == 0:
  print(int(h/a))
else:
  print(int(h/a+1))
Buggy python submission (verdict: Runtime Error):
x,a = int(input())

if x > a:
  print(0)
else:
  print(10)

Fixed submission:
x,a = map(int, input().split())
 
if x < a:
  print(0)
else:
  print(10)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())

if a >= 13:
  print(b)
elif: a =< 5:
    print(0)
else:
  print(int(b/2))
  

Fixed submission:
a, b = map(int, input().split())
 
if a >= 13:
  print(b)
elif a <= 5:
    print(0)
else:
  print(int(b/2))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a*b % 2 == 0:
  return 'Even'
else:
  return '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):
S = int(input())
i = 0
C = 0

while i < 3:
  if S[i] == 1:
    C += 1
  i += 1
  
print(str(C))  

Fixed submission:
s = str(input())

count = 0
for i in range(3):
    if s[i] == '1':
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input()
b = input()
res = ''
for i in range(len(a)):
    res += a[i]
    res += b[i]
print(res)


Fixed submission:
n = int(input())
a, b = input().split(' ')
res = ''
for i in range(n):
    res += a[i]
    res += b[i]
print(res)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
print(a/gcd(a, b)*b)


def gcd(a, b):
    if not b:
        return a
    return gcd(b, a % b)


Fixed submission:
def gcd(a, b):
    if not b:
        return a
    return gcd(b, a % b)

a, b = map(int, input().split())
print(a//gcd(a, b)*b)

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


def gcd(a, b):
    if not b:
        return a
    return gcd(b, a % b)


Fixed submission:
def gcd(a, b):
    if not b:
        return a
    return gcd(b, a % b)

a, b = map(int, input().split())
print(a//gcd(a, b)*b)

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

a, b = map(int, input().split())
print(a//math.gcd(a, b)*b)


Fixed submission:
def gcd(a, b):
    if not b:
        return a
    return gcd(b, a % b)

a, b = map(int, input().split())
print(a//gcd(a, b)*b)

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

a, b = input().split(' ')
a = int(a)
b = int(b)
print(a//math.gcd(a, b)*b)


Fixed submission:
def gcd(a, b):
    if not b:
        return a
    return gcd(b, a % b)

a, b = map(int, input().split())
print(a//gcd(a, b)*b)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(max([a+b,a-b,a*b]))

Fixed submission:
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(max(a+b,max(a-b,a*b)))

Fixed submission:
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
prinp(b*2-a)

Fixed submission:
a=int(input())
b=int(input())
print(b*2-a)

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

Fixed submission:
a=int(input())
b=int(input())
print(b*2-a)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 29 22:19:15 2020

@author: naoki
"""

N = int(input())

A = list(map(int,input().split()))

count1 = 0
count2 = 0
count = 10**9 +7
for i in A:
    count1+=i
	count1=count1%count
for j in A:
    count2 = j*(count1-j)%count + count2
    count1 = count1 -j 
    
print(count2%count)
    
    
    

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 29 22:19:15 2020

@author: naoki
"""

N = int(input())

A = list(map(int,input().split()))

count1 = 0
count2 = 0
count = 10**9 +7
for i in A:
    count1+=i

for j in A:
    count2 = (j*(count1-j) + count2)%count
    count1 = count1 -j 
    
print(count2%count)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 12 21:52:40 2020

@author: naoki
"""

N = int(input()) # 並んでいる人数N

S = input() # 向いている方向
    
change = [0 for i in range(N)] # 向きを変えた回数を格納

for i in range(N):
    change[i] += S.count("W",0,i) # リーダーよりも西側にいるときに西に向いている人数をカウント
    change[i] += S.count("E",i+1,N) # リーダーよりも東側にいるときに東を向いている人数をカウント
change.sort() # 向きを変えた回数が少ない順に並べ替え
print(change[0])


Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 12 21:52:40 2020

@author: naoki
"""

N = int(input()) # 並んでいる人数N

S = input() # 向いている方向
    
change = [0 for i in range(N)] # 向きを変えた回数を格納
change[0] = S.count("E",1,N)
for i in range(1,N):
        if S[i-1] == "W" and S[i] == "E":
            change[i] = change[i-1]
        elif S[i-1] == "W" and S[i] != "E": 
            change[i] = change[i-1] + 1
        elif S[i-1] != "W" and S[i] == "E":
            change[i] = change[i-1] - 1
        else:
            change[i] = change[i-1]
change.sort()
print(change[0])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 12 21:52:40 2020

@author: naoki
"""

N = int(input()) # 並んでいる人数N

S = input() # 向いている方向

direction = [0 for i in range(N)] 

for i in range(N):
    direction[i] = S[i] # 向いている方向を開裂で定義しなおす
    
count = [0 for i in range(N)] # 向きを変える回数

for i in range(N):
    for k in range(N):
        if k<i and direction[k] == "W": #リーダーよりも西側にいる場合は東に向かせる
            count[i] += 1
        elif i<k and direction[k] == "E": # リーダーよりも東側にいる場合は西に向かせる
            count[i] += 1
count.sort() # 値が小さい順番に並び替える
print(count[0])


Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 12 21:52:40 2020

@author: naoki
"""

N = int(input()) # 並んでいる人数N

S = input() # 向いている方向
    
change = [0 for i in range(N)] # 向きを変えた回数を格納
change[0] = S.count("E",1,N)
for i in range(1,N):
        if S[i-1] == "W" and S[i] == "E":
            change[i] = change[i-1]
        elif S[i-1] == "W" and S[i] != "E": 
            change[i] = change[i-1] + 1
        elif S[i-1] != "W" and S[i] == "E":
            change[i] = change[i-1] - 1
        else:
            change[i] = change[i-1]
change.sort()
print(change[0])
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Fri May 29 21:29:28 2020

@author: naoki
"""
import math

N = int(input()) # 時計の個数
T = [int(input()) for i in range(N)] # 時計の針が一周する時間
T.sort() # 小さい順番にソートする
lcm = T[0] 

for i in range(1,N):
    lcm = lcm*T[i]// math.gcd(lcm,T[i])
print(lcm)


Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Fri May 29 21:29:28 2020

@author: naoki
"""
import fractions

N = int(input()) # 時計の個数
T = [int(input()) for i in range(N)] # 時計の針が一周する時間
T.sort() # 小さい順番にソートする
lcm = T[0] 

for i in range(1,N):
    lcm = lcm*T[i]// fractions.gcd(lcm,T[i])
print(lcm)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Created on Thu Jun  4 22:35:46 2020

@author: naoki
"""

import sys

N = int(input()) # ボタンの個数
a = [int(input()) for i in range(N)] #k番目のボタンに書いてある番号
a = [0] + a #配列の番号合わせ
count = 0 #ボタンを押す回数
light = 1 # 光っているボタンの番号
if 2 not in a: # 2と書かれたボタンがない場合は不可能なので-1を出力
    print(-1)
    sys.exit()
else: # 2と書かれたボタンがある場合
    while light != 2 or count >= N : # 光っているボタンが2になるか、ボタンを押した回数がNを超えてしまったら終了
        count += 1 
        light = a[light]#左から数えたときに光っているボタンの番号の順番にあるボタンに書かれている数字が次に光るボタンの番号である。

if light != 2:
    print(-1)
else:
    print(count)
    

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Thu Jun  4 22:35:46 2020

@author: naoki
"""

import sys

N = int(input()) # ボタンの個数
a = [int(input()) for i in range(N)] #k番目のボタンに書いてある番号
a = [0] + a #配列の番号合わせ
count = 0 #ボタンを押す回数
light = 1 # 光っているボタンの番号
if 2 not in a: # 2と書かれたボタンがない場合は不可能なので-1を出力
    print(-1)
    sys.exit()
else: # 2と書かれたボタンがある場合
    while light != 2 and count <= N : # 光っているボタンが2になるか、ボタンを押した回数がNを超えてしまったら終了
        count += 1 
        light = a[light]#左から数えたときに光っているボタンの番号の順番にあるボタンに書かれている数字が次に光るボタンの番号である。

if count <= N:        
        print(count)
else:
    print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, c, d = map(int, input().split())

maxi = float("-inf")
for i in range(a, b + 1):
  for j in range(c, d + 1):
    maxi = max(maxi, i * j)
print(maxi)

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

print(max(a*c, a*d, b*c, b*d))
Buggy python submission (verdict: Runtime Error):
i = 0
j = i+1
ans = 0
while i != n - 1:
    ans = (ans+(a[i] * a[j])) % 1000000007
    j += 1
    if j == n:
        i += 1
        j = i + 1
print(ans)


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

sum = [0 for i in range(n+1)]
for i in range(n - 1, -1, -1):
    sum[i] = sum[i + 1] + a[i]
ans = 0
for i in range(n):
    ans = (ans+(a[i]*sum[i+1])) % 1000000007
print(ans)

Buggy python submission (verdict: Runtime Error):
i = 0
j = i+1
ans = 0
while i != n - 1:
  ans += a[i] * a[j]
  j += 1
  if j == n:
    i += 1
    j = i + 1
print(ans % 1000000007)

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

sum = [0 for i in range(n+1)]
for i in range(n - 1, -1, -1):
    sum[i] = sum[i + 1] + a[i]
ans = 0
for i in range(n):
    ans = (ans+(a[i]*sum[i+1])) % 1000000007
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = (int(x) for x in input().split())
s = (a + b) % 2
t = (a + b) / 2
if s == 0:
	print(t)
	else:
	print(t + 0.5)	

Fixed submission:
import math
a, b = (int(t) for t in input().split())
x = (a + b) / 2
print(math.ceil(x))
Buggy python submission (verdict: Runtime Error):
X=input("")
Y=input("")
Z=input("")
if 1<=X<=100and 1<=Y<=100 and 1<=Z<=100 :
  print(Y, X, Z)
  print(Z, Y, x)

Fixed submission:
A,B,C=map(int,input().split())
print(C,A,B)
Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
if A==1 and B==2:
  print(3)
elif A==2 and B==3:
  print(1)
else A==3 and B==1:
  print(2)


Fixed submission:
A=int(input())
B=int(input())
if A==1 and B==2:
  print(3)
elif A==2 and B==3:
  print(1)
elif A==3 and B==1:
  print(2)
elif A==1 and B==3:
  print(2)
elif A==3 and B==2:
  print(1)
else:
  print(3)
Buggy python submission (verdict: Runtime Error):
N,A,B = map(int,input().slit())
if N*A<B:
  print(N*A)
elif N*A>B:
  print(B)
else:
  print()

Fixed submission:
N,A,B = map(int,input().split())
if N*A<=B:
  print(N*A)
else:
  print(B)

Buggy python submission (verdict: Runtime Error):
N,A,B = map(int,input().slit())
if N*A<=B:
  print(N*A)
else N*A>=B:
  print(B)

Fixed submission:
N,A,B = map(int,input().split())
if N*A<=B:
  print(N*A)
else:
  print(B)
Buggy python submission (verdict: Runtime Error):
X=int(input())
if X==3:
  print("YES")
elif X==5:
  print("YES")
elif X==7:
  print("YES”)
else :
  print("NO")

Fixed submission:
X=int(input())
if X==3:
  print("YES")
elif X==5:
  print("YES")
elif X==7:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
X=input()
if X==3:
  print("YES")
elif X==5:
  print("YES")
elif X==7:
  print("YES”)
else :
  print("NO")

Fixed submission:
X=int(input())
if X==3:
  print("YES")
elif X==5:
  print("YES")
elif X==7:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


def main():
   s = input()
   if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

if __name__ == "__main__":
    main()

Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


def main():
    s = input()
    if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


def main():
  	s = input()
   	if s[-1] == "s":
        print(s + "es")
   	else:
        print(s + "s")

if __name__ == "__main__":
    main()

Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


def main():
    s = input()
    if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def main():
    n = int(input())
    count = 0
    for i in range(n-1):
        div_lists = make_divisors(i+1)
        count += len(div_lists)
    print(count)
        

if __name__ == "__main__":
    main()

Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    n = int(input())
    ans = 0
    for i in range(1,n):
        ans += (n-1)//i

    print(ans)
        

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, factorial
from copy import deepcopy
 
def main():
    n = int(input()) % (10**9+7)
    num = 0
    ans = (10**n) - 2(9**n) + (8**n) 
    print(ans%810**9+7)
    

if __name__ == "__main__":
    main()

Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, factorial
from copy import deepcopy
 
def main():
    n = int(input()) 
    ans = (10**n) - 2*(9**n) + (8**n) 
    print(ans%(10**9+7))
    

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
import numpy 
 
def main():
    n = int(input())
    alist = list(map(int, input().split()))
    max_num = 10**9 + 7
    ans = 0
    for i in range(n):
        ans += numpy.cumsum(alist[:i+1])

    print(ans%max_num)

if __name__ == "__main__":
    main()

Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 

def cumsum(xs):
    pass

def main():
    n = int(input())
    alist = list(map(int, input().split()))
    max_num = 10**9 + 7
    ans = 0
    sum_num = sum(alist)

    for i in range(n-1):
        sum_num -= alist[i]
        ans += alist[i] * sum_num
        

    print(ans%max_num)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    k = int(input())

    if k%2 == 0:
        print(-1) 
        sys.exit()

    num = "7"
    ans = 1
    while(int(num)%k != 0):
        num += "7"
        ans += 1

    print(ans)

if __name__ == '__main__':
	main()


Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    k = int(input())

    if k%2 == 0 or k%5 == 0:
        print(-1) 
        sys.exit()

    mod = 7
    for i in range(1,10**6+1):   
        
        if mod%k == 0:
            print(i)
            sys.exit()
        mod = (mod*10 + 7)%k

if __name__ == '__main__':
	main()

Buggy python submission (verdict: Time Limit Exceeded):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    k = int(input())

    if k%2 == 0:
        print(-1) 
        sys.exit()

    num = "7"
    ans = 1
    while(int(num)%k != 0):
        num += "7"
        ans += 1

    print(ans)

if __name__ == '__main__':
	main()


Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    k = int(input())

    if k%2 == 0 or k%5 == 0:
        print(-1) 
        sys.exit()

    mod = 7
    for i in range(1,10**6+1):   
        
        if mod%k == 0:
            print(i)
            sys.exit()
        mod = (mod*10 + 7)%k

if __name__ == '__main__':
	main()
Buggy python submission (verdict: Runtime Error):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    n = int(input())
    ans = [0]*(10**4)
    h = 0

    for i in range(1,51):
        for j in range(1,51):
            for m in range(1,51):
                h = i*(i+j) + j*(j+m) + m*(m+i)
                if h >= len(ans):
                    break
                ans[h] += 1

    for i in range(1,n+1):
        print(ans[i])

if __name__ == '__main__':
	main()


Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    n = int(input())
    ans = [0]*(10**4+1)
    h = 0

    for i in range(1,99):
        for j in range(1,99):
            for m in range(1,99):
                h = i**2 + j**2 + m**2 + i*j + j*m + m*i
                if h >= (10**4)+1:
                    break
                ans[h] += 1

    for i in range(1,n+1):
        print(ans[i])

if __name__ == '__main__':
	main()
Buggy python submission (verdict: Runtime Error):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, gcd
from copy import deepcopy
from functools import reduce

def main():
    n = int(input())
    lists = []
    ans = [0]*4
    for i in range(n):
        s = input()
        if not s in lists:
            lists.append(s)


        if s == "AC":
            ans[0] += 1
        elif s == "WA" :
            ans[1] += 1
        elif s == "TLE":
            ans[2] += 1
        else:
            ans[3] += 1
    

    for i in range(ans):
        if i == 0:
            print("AC x", ans[i])
        elif i == 1 :
            print("WA x", ans[i])
        elif i == 2:
            print("TLE x", ans[i])
        else:
            print("RE x", ans[i])


if __name__ == "__main__":
    main()

Fixed submission:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, gcd
from copy import deepcopy
from functools import reduce

def main():
    n = int(input())
    lists = []
    ans = [0]*4
    for i in range(n):
        s = input()
        if not s in lists:
            lists.append(s)


        if s == "AC":
            ans[0] += 1
        elif s == "WA" :
            ans[1] += 1
        elif s == "TLE":
            ans[2] += 1
        else:
            ans[3] += 1
    

    for i in range(len(ans)):
        if i == 0:
            print("AC x", ans[i])
        elif i == 1 :
            print("WA x", ans[i])
        elif i == 2:
            print("TLE x", ans[i])
        else:
            print("RE x", ans[i])


if __name__ == "__main__":
    main()