Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=[i+1 for i in range(n)]
ans=sum(p)-p[n-1]
print(ans)

Fixed submission:
n=int(input())
ans=n*(n-1)//2
print(ans)
Buggy python submission (verdict: Runtime Error):
import copy
import math
n, k = map(int, input().split())
a=[]
a=list(map(int, input().split()))
b=copy.copy(a)
ans=0
b.extend(a)
#print(b)
#print(b[n])

def fact(i):
    sum=1
    for j in range(1,k):
        sum*=j
    return j
        
    """
    if i==1:
        return 1
    else:
        return i*fact(i-1)
    """

for i in range(len(b)):
    tmp=0
    for j in range(i+1,len(b)):
        if j<n:
            if b[i]>b[j]:
                #print("B["+str(i)+"]:" + str(b[i])+" B["+str(j)+"]:"+str(b[j]))
                ans+=1
        else:
            if b[i]>b[j]:
                #print("B["+str(i)+"]:" + str(b[i])+" B["+str(j)+"]:"+str(b[j])+"#")
                tmp+=1
    tmp=int((tmp*sum(list(range(1,k))))%(1e+9+7))
    ans=int((ans+tmp)%(1e+9+7))
print(ans)

#ans=int((ans+1)%(1e+9+7))

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

ans_mono=0
ans_di=0
for i in range(n):
    for j in range(i+1,n):
        if a[i]>a[j]:ans_mono+=1
for i in range(n):
    for j in range(n):
        if a[i]>a[j]:ans_di+=1
print((ans_mono*k+ans_di*(k*(k-1)//2))%int(1e+9+7))
Buggy python submission (verdict: Time Limit Exceeded):
import copy
n=int(input())
string=[]
ang=0
charcou=[[0]*26 for i in [1]*n]
for c in range(n):
    string.append(input())
    for d in range(10):
        charcou[c][ord(string[c][d])-97]+=1

for c in range(n):
    for d in range(c+1,n):
        if charcou[c]==charcou[d]:
            ang+=1
print(ang)

Fixed submission:
n=int(input())
string=[]
ang=0
charcou=[[0]*26 for i in [1]*n]
for c in range(n):
    string.append(input())
    for d in range(10):
        charcou[c][ord(string[c][d])-97]+=1
charcou.sort()
c=0
while c<n-1:
    comb=1
    while charcou[c]==charcou[c+1]:
        comb+=1
        c+=1
        if c>=n-1:
            break
    if comb!=1:
        ang+=int(comb*(comb-1)/2)
    c+=1
print(ang)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n=int(input())
string=[]
ang=0
cou=0
for c in range(n):
    string.append(input())

charcou=[[0]*26 for i in [1]*n]
for c in range(n):
    for d in range(10):
        charcou[c][ord(string[c][d])-97]+=1

for c in range(n):
    for d in range(c+1,n):
        if charcou[c]==charcou[d]:
            ang+=1
print(ang)

Fixed submission:
n=int(input())
string=[]
ang=0
charcou=[[0]*26 for i in [1]*n]
for c in range(n):
    string.append(input())
    for d in range(10):
        charcou[c][ord(string[c][d])-97]+=1
charcou.sort()
c=0
while c<n-1:
    comb=1
    while charcou[c]==charcou[c+1]:
        comb+=1
        c+=1
        if c>=n-1:
            break
    if comb!=1:
        ang+=int(comb*(comb-1)/2)
    c+=1
print(ang)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n=int(input())
string=[]
ang=0
cou=0
for c in range(n):
    string.append(input())
    
for c in range(n):
    for d in range(c+1,n):
        cou=0
        tmp=list(copy.copy(string[d]))
        for e in range(10):
            found = 0
            for f in range(10):
                if string[c][e]==tmp[f]:
                    found=1
                    cou+=1
                    tmp[f]='Z'
                    break
            if found==0:
                break
        if cou==10:
            ang+=1
print(ang)

Fixed submission:
n=int(input())
string=[]
ang=0
charcou=[[0]*26 for i in [1]*n]
for c in range(n):
    string.append(input())
    for d in range(10):
        charcou[c][ord(string[c][d])-97]+=1
charcou.sort()
c=0
while c<n-1:
    comb=1
    while charcou[c]==charcou[c+1]:
        comb+=1
        c+=1
        if c>=n-1:
            break
    if comb!=1:
        ang+=int(comb*(comb-1)/2)
    c+=1
print(ang)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n=int(input())
A=list(map(int,input().split()))
anp=np.array(A)
anp*=2
for i in range(len(A)):
    x=anp[i]
    flag=1
    for j in range(i+1,i+len(A)):
        k=j%len(A)
        if flag:
            x-=anp[k]
            flag=0
        else:
            x+=anp[k]
            flag=1
    x/=2
    print(int(x),end=" ")
print()

Fixed submission:
import sys
input=sys.stdin.readline

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

suma=sum(a)
x=[0]*n
tmp=0
for i in range(1,n,2):
    tmp+=a[i]
x[0]=suma-2*tmp

for i in range(1,n):
    x[i]=2*a[i-1]-x[i-1]
for i in x:
    print(i,end=" ")
Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
L=list(map(int,input().split()))
D=0
i=0
s=0
while D<=X or i<N:
  D+=L[i]
  s+=1
  i+=1
print(s)

Fixed submission:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

def main():
    n,x=L()
    l=L()
    ans=1
    d=0
    for i in range(n):
       d=d+l[i]
       if d<=x:
           ans+=1
    print(ans)
    

if __name__=='__main__':
    main()

Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
L=list(map(int,input().split()))
D=0
i=0
s=0
while D<=X:
  D+=L[i]
  s+=1
  i+=1
print(s)

Fixed submission:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

def main():
    n,x=L()
    l=L()
    ans=1
    d=0
    for i in range(n):
       d=d+l[i]
       if d<=x:
           ans+=1
    print(ans)
    

if __name__=='__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))

def main():
    n,k=L()
    h=L()
    dp=[1e+12]*n
    dp[0]=0
    for i in range(n):
        for j in range(1,k+1):
            if i+j>=n:
                break
            dp[i+j]=min(dp[i+j],dp[i]+abs(h[i]-h[i+j]))
    print(dp[n-1])
    
    
if __name__ == '__main__':
    main()

Fixed submission:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))

def main():
    n,k=L()
    h=L()
    dp=[1e+12]*n
    dp[0]=0
    for i in range(n):
        for j in range(1,k+1):
            if i+j>=n:
                break
            dp[i+j]=min(dp[i+j],dp[i]+abs(h[i]-h[i+j]))
    print(dp[n-1])
    
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))
ans=0
for i in range(n):
    if i+1==p[i]:
        p[i],p[i+1]=p[i+1],p[i]
        ans+=1
print(ans)

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
ans=0
for i in range(n):
    if i+1==p[i]:
        if i+1==n:
            p[i],p[i-1]=p[i-1],p[i]
        else:
            p[i],p[i+1]=p[i+1],p[i]
        ans+=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
m = 10 ** 9 + 7

def Calc(a: int, b: int) -> int:
    return (a * b) % m

ans = 0

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

print(ans)


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

total = [0] * (N + 1)
for i in range(N):
    total[i + 1] = total[i] + A[i]

total_rev = [0] * (N + 1)
for i in range(N):
    total_rev[i] = total[N] - total[i]

ans = 0
for i in range(N - 1):
    ans = (ans + A[i] * total_rev[i + 1]) % m

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())

if K % 2 == 0 or K % 5 == 0:
    print(-1)
    exit()
now = 0
count = 0
while True:
    now = now * 10 + 7
    count += 1
    if now % K == 0:
        print(count)
        exit()


Fixed submission:
K = int(input())

if K % 2 == 0 or K % 5 == 0:
    print(-1)
    exit()
now = 0
count = 0
while True:
    now = (now * 10 + 7) % K
    count += 1
    if now % K == 0:
        print(count)
        exit()

Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())

now = 0
count = 0
while True:
    now = now * 10 + 7
    count += 1
    if now % K == 0:
        print(count)
        exit()


Fixed submission:
K = int(input())

if K % 2 == 0 or K % 5 == 0:
    print(-1)
    exit()
now = 0
count = 0
while True:
    now = (now * 10 + 7) % K
    count += 1
    if now % K == 0:
        print(count)
        exit()
Buggy python submission (verdict: Runtime Error):
H, W, K = map(int, input().split())
fi = []
for _ in range(H):
  s = input()
  fi.append(s)
a = 1 << H
b = 1 << W
total = 0

for i in range(a * b):
  lh = list()
  lw = list()

  for j in range(h):
    if i & (1 << j):
      lh.append(1)
    else:
      lh.append(0)
  for j in range(W):
    if i & (1 << (j + H)):
      lw.append(1)
    else:
      lw.append(0)

  cnt = 0
  for j in range(H):
    for l in range(W):
      if lh[j] == 1 or lw[j] == 1:
        continue
      if fi[j][l] == '#':
        cnt += 1
  if cnt == K:
    total += 1

print(total)


Fixed submission:
H, W, K = map(int, input().split())
fi = []
for _ in range(H):
    s = input()
    fi.append(s)
a = 2 ** H
b = 2 ** W
total = 0

for i in range(a * b):
    lh = list()
    lw = list()

    for j in range(H):
        if i & (1 << j):
            lh.append(1)
        else:
            lh.append(0)
    for j in range(W):
        if i & (1 << (j + H)):
            lw.append(1)
        else:
            lw.append(0)
    # print(lh)
    # print(lw)

    cnt = 0
    for j in range(H):
        for l in range(W):
            if lh[j] == 1 or lw[l] == 1:
                continue
            if fi[j][l] == '#':
                cnt += 1
    # print(cnt)
    if cnt == K:
        total += 1

print(total)
Buggy python submission (verdict: Runtime Error):
nums = input().split()
print(int(num[0]) * int(num[1]))


Fixed submission:
nums = input().split()
print(int(nums[0]) * int(nums[1]))

Buggy python submission (verdict: Runtime Error):
nums = input().split()
print(float(num[0]) * float(num[1]))


Fixed submission:
nums = input().split()
print(int(nums[0]) * int(nums[1]))
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, K = map(int, input().split())

counter = 0
sum = 0
rest = K
while True:
    #print("counter: ", counter, "sum: ", sum, "rest: ", rest)
    if rest == 0:
        break

    if counter < A:
        #print("Add 1")
        sum += 1
    elif counter < A + B:
        #print("Do nothing")
        pass
    else:
        #print("Subtract 1")
        sum -= 1
    counter += 1
    rest -= 1
print(sum)


Fixed submission:
A, B, C, K = map(int, input().split())


if 0 < K <= A:
    print(K)
elif A < K < A + B:
    print(A)
else:
    C_num = K - (A + B)
    print(A - C_num)
Buggy python submission (verdict: Runtime Error):
K = int(input())
A = int(input().split()[0])
B = int(input().split()[1])

for i in range(A, B + 1):
    if i % K == 0:
        print("OK")
        break
        exit()
print("NG")


Fixed submission:
K = int(input())
S = input().split()
A = int(S[0])
B = int(S[1])

for i in range(A, B + 1):
    if i % K == 0:
        print("OK")
        exit()
print("NG")
Buggy python submission (verdict: Runtime Error):
import math
from decimal import Decimal
X = int(input())
now = Decimal(100)
year = 0

while True:
    if now >= X:
        break
    #王道
    #now += now // 100

    #Decimal型を経由する方法
    #now = int(now * Decimal("1.01"))
    #now = int(now * round(Decimal(1.01), 2))
    now = int(now * round(1.01, 2))
    #now = Decimal(math.floor(now * Decimal(1.01)))
    year += 1

print(year)


Fixed submission:
import math
X = int(input())
now = 100

year = 0

while True:
    if now >= X:
        break
    now += now // 100
    year += 1

print(year)

Buggy python submission (verdict: Runtime Error):
import math
from decimal import Decimal
X = int(input())
now = 100
year = 0

while True:
    if now >= X:
        break
    #王道
    #now += now // 100

    #Decimal型を経由する方法
    #now = int(now * Decimal("1.01"))
    #now = int(now * round(Decimal(1.01), 2))
    now = now * Decimal(floor(now * 1.01))


    year += 1

print(year)


Fixed submission:
import math
X = int(input())
now = 100

year = 0

while True:
    if now >= X:
        break
    now += now // 100
    year += 1

print(year)

Buggy python submission (verdict: Runtime Error):
import math
from decimal import Decimal
X = int(input())
now = 100
year = 0

while True:
    if now >= X:
        break
    #王道
    #now += now // 100

    #Decimal型を経由する方法
    #now = int(now * Decimal("1.01"))
    #now = int(now * round(Decimal(1.01), 2))
    now = Decimal(floor(now * 1.01))


    year += 1

print(year)


Fixed submission:
import math
X = int(input())
now = 100

year = 0

while True:
    if now >= X:
        break
    now += now // 100
    year += 1

print(year)

Buggy python submission (verdict: Time Limit Exceeded):
import math
from decimal import Decimal

X = int(input())
now = 100
year = 0

while True:
    if now >= X:
        break
    now_bad = int(now * Decimal(1.01))
    year += 1

print(year)


Fixed submission:
import math
X = int(input())
now = 100

year = 0

while True:
    if now >= X:
        break
    now += now // 100
    year += 1

print(year)
Buggy python submission (verdict: Runtime Error):
N = input()

if "7" in N:
    print(Yes)
else:
    print(No)


Fixed submission:
N = input()

if "7" in N:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
X, Y, Z = map(int, input())
print(Z, X, Y)


Fixed submission:
X, Y, Z = map(int, input().split())
print(Z, X, Y)
Buggy python submission (verdict: Runtime Error):
import math

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

volume_A = A / 0.08
volume_B = B / 0.1

min_A, max_A = volume_A, volume_A
range_A = 1 / 0.08
min_B, max_B = volume_B, volume_B
range_B = 1 / 0.1

for i in range(math.floor(volume_A - range_A), math.ceil(volume_A + range_A)):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(math.floor(volume_B - range_B), math.ceil(volume_B + range_B)):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)

ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)

ans = ans_A & ans_B

if len(ans) == 0:
    print(-1)
else:
    print(min(ans))


Fixed submission:
import math

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

volume_A = math.floor(A / 0.08)
volume_B = math.floor(B / 0.1)

min_A, max_A = math.inf, -math.inf
range_A = math.floor(1 / 0.08)
min_B, max_B = math.inf, -math.inf
range_B = math.floor(1 / 0.1)
# print(range_A)
# print(range_B)

for i in range(volume_A - range_A, volume_A + range_A):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(volume_B - range_B, volume_B + range_B):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)
# print(ans_A)

ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)
# print(ans_B)

ans = ans_A & ans_B

if len(ans) == 0:
    print(-1)
else:
    print(min(ans))
Buggy python submission (verdict: Time Limit Exceeded):
#Input
N, W = map(int, input().split())
w = [0] * N
v = [0] * N

for i in range(N):
    w[i], v[i] = map(int, input().split())

DP = [[0 for j in range(W + 1)] for i in range(N + 1)]
# print(DP)
#Initialization
for i in range(W):
    DP[0][i] = 0

for i in range(1, N + 1):
    for j in range(W + 1):
        if w[i - 1] > j:
            DP[i][j] = DP[i - 1][j]
        else:
            # print("i, j:", i, j)
            DP[i][j] = max(DP[i - 1][j], DP[i - 1][j - w[i - 1]] + v[i - 1])

# print(DP)
print(DP[N][W])


Fixed submission:
#Input
N, W = map(int, input().split())
w = [0] * N
v = [0] * N

for i in range(N):
    w[i], v[i] = map(int, input().split())

DP = [[0 for j in range(W + 1)] for i in range(N + 1)]
# print(DP)
#Initialization
for i in range(W):
    DP[0][i] = 0

for i in range(1, N + 1):
    for j in range(W + 1):
        if w[i - 1] > j:
            DP[i][j] = DP[i - 1][j]
        else:
            # print("i, j:", i, j)
            DP[i][j] = max(DP[i - 1][j], DP[i - 1][j - w[i - 1]] + v[i - 1])

# print(DP)
print(DP[N][W])
Buggy python submission (verdict: Runtime Error):
n=int(input())
g=lambda x:(x*(n//x)*(n//x+1))//2
print(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1))))

Fixed submission:
def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
n=int(input())
print(sum(num_divisors_table(n-1)))

Buggy python submission (verdict: Runtime Error):
n=int(input())
g=lambda x:(x*(n//x)*(n//x+1))//2
print(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1)))

Fixed submission:
def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
n=int(input())
print(sum(num_divisors_table(n-1)))

Buggy python submission (verdict: Time Limit Exceeded):
import math

def make_prime_list_2(num):
    if num < 2:
        return []

    # 0のものは素数じゃないとする
    prime_list = [i for i in range(num + 1)]
    prime_list[1] = 0 # 1は素数ではない
    num_sqrt = math.sqrt(num)

    for prime in prime_list:
        if prime == 0:
            continue
        if prime > num_sqrt:
            break

        for non_prime in range(2 * prime, num, prime):
            prime_list[non_prime] = 0

    return [prime for prime in prime_list if prime != 0]

def search_divisor_num_1(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list_2(num_sqrt)

        divisor_num = 1
        for prime in prime_list:
            count = 1
            while num % prime == 0:
                num //= prime
                count += 1
            divisor_num *= count

        if num != 1:
            divisor_num *= 2

        return divisor_num

n=int(input())
print(sum(search_divisor_num_1(i) for i in range(1,n)))


Fixed submission:
def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
n=int(input())
print(sum(num_divisors_table(n-1)))

Buggy python submission (verdict: Time Limit Exceeded):
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n=int(input())
ans=0
for i in range(1,n):
    ans+=len(make_divisors(i))
print(ans)

Fixed submission:
def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
n=int(input())
print(sum(num_divisors_table(n-1)))
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
li=[]
ans=0
if m!=0: 
    for i in range(m):
        a,b=map(int,input().split())
        if len(li)==0:
            li.append([a,b])
        else:
            flag=0
            for j in range(len(li)):
                if a in li[j] and b not in li[j]:
                	li[j].append(b)
                	flag=1
                elif a not in li[j] and b in li[j]:
                    li[j].append(a)
                    flag=1
                elif a in li[j] and b in li[j]:
                    break
                elif flag==0 and j==len(li)-1:
                    li.append([a,b])
        #print(li)
    ans=max([len(li[i]) for i in range(len(li))])
print(ans if m!=0 else 1)


Fixed submission:
d,t,s=map(int,input().split())
print("Yes" if t*s>=d else "No")
Buggy python submission (verdict: Time Limit Exceeded):
k=int(input())
for i in range(1,10**6):
  if k%2==0:
    print("-1")
    quit()
  ki=int("7"*i)
  if ki%k==0:
    print(i)
    quit()
print("-1")

Fixed submission:
k=int(input())
if k%2==0 or k%5==0:
  print("-1")
  quit()
ki=0
for i in range(1,10**6):
  ki=(ki*10+7)%k
  if ki==0:
    print(i)
    quit()
print("-1")
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,k=map(int,input().split())
kk=k
ans=0
while k>=1:
    k-=1
    if a>=1:
        a-=1
        ans+=1
    elif b>=1:
        b-=1
    elif c>=1:
        c-=1
        ans-=1
print(ans)


Fixed submission:
a,b,c,k=map(int,input().split())
ans=0
if k<a:
    ans+=k
elif k<a+b:
    ans+=a
elif k<=a+b+c:
    ans=ans+a-(k-a-b)
print(ans)
Buggy python submission (verdict: Runtime Error):
li=[]
a,b,n=map(int,input().split())
for x in range(1,n+1):
    if x%b!=0:
        li.append((a*x)//b-a*(x//b))
print(max(li))


Fixed submission:
a,b,n=map(int,input().split())
print((a*min(n,b-1))//b)

Buggy python submission (verdict: Time Limit Exceeded):
li=[]
a,b,n=map(int,input().split())
for x in range(1,n+1):
    li.append((a*x)//b-a*(x//b))
print(max(li))

Fixed submission:
a,b,n=map(int,input().split())
print((a*min(n,b-1))//b)
Buggy python submission (verdict: Runtime Error):
s=input()
ans=0
for i in range(len(s)-4):
    for j in range(i+4,len(s)):
        if int(s[i:j+1])%2019==0:
            ans+=1
print(ans)

Fixed submission:
s,w=map(int,input().split())
if w>=s:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
A=list(map(int,input().split()))
for i in range(1,n+1):
    print(A.count(i))


Fixed submission:
import collections
n=int(input())
A=list(map(int,input().split()))
cli=collections.Counter(A)
for i in range(1,n+1):
    print(cli[i])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
A=list(map(int,input().split()))
for i in range(1,n+1):
    print(A.count(i))



Fixed submission:
import collections
n=int(input())
A=list(map(int,input().split()))
cli=collections.Counter(A)
for i in range(1,n+1):
    print(cli[i])
Buggy python submission (verdict: Runtime Error):
N=str(input())
if "7" in N:
  print("Yes")
else:
  print("No)


Fixed submission:
N=str(input())
if "7" in N:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
N=input()
if "7" in N:
  print("Yes")
else:
  print("No)

Fixed submission:
N=str(input())
if "7" in N:
  print("Yes")
else:
  print("No")