Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02729 (python)

Fixed submission:
n, m = list(map(int,input().strip().split()))
print(((n- 1)*(n))//2 + ((m-1)*(m))//2)

Buggy submission (verdict: Runtime Error):
print((int(input()))**3/27)
Problem p02753 (python)

Fixed submission:
s = input() 
print('No' if (s == 'BBB' or s == 'AAA') else 'Yes')

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
low = int(min(a//0.08,b//0.1))
high = int(max((a+1)//0.08,(b+1)//0.1))
for i in range(low,high+1):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i);  break
else:
    print(-1)
Problem p02819 (python)

Fixed submission:
def SieveOfEratosthenes(n): 
    prime = [True for i in range(10**6 + 1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * 2, 10**6 + 1, p): 
                if prime[i]:    prime[i] = False
        p += 1
    prime[0], prime[1] = False, False
    count = 1
    while(True):
        if prime[p] and p>=n:
            print(p);    break
        p += 1
            
n = int(input())
SieveOfEratosthenes(n)

Buggy submission (verdict: Runtime Error):
def SieveOfEratosthenes(n): 
    prime = [True for i in range(10**5 + 1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * 2, 10**5 + 1, p): 
                if prime[i]:
                    prime[i] = False
        p += 1
    prime[0], prime[1]= False, False
    count = 1
    while(True):
        if prime[p] and p>n:
            print(p)
            break
        p += 1
            
n = int(input())
SieveOfEratosthenes(n)

Buggy submission (verdict: Runtime Error):
def SieveOfEratosthenes(n): 
    prime = [True for i in range(10**5 + 1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * 2, 10**5 + 1, p): 
                if prime[i]:
                    prime[i] = False
        p += 1
    prime[0], prime[1]= False, False
    count = 1
    while(True):
        if prime[p] and p>n:
            print(p)
            break
        p += 1
            
x = int(input())
SieveOfEratosthenes(n)
Problem p03208 (python)

Fixed submission:
n,k = map(int,input().split())
h = sorted([int(input()) for _ in range(n)])
ans = h[k-1]-h[0]
for i in range(n-k+1):
    m = h[i+k-1]-h[i]
    ans = min(m,ans)
print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = sorted([int(input()) for _ in range(n)])
print(min(ans[j+k-1]-ans[j] for j in range(n-k+1)))
Problem p02570 (python)

Fixed submission:
D, T, S = map(int, input().split())
if D / S > T:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
result = 0
i = 0
for x in A[:N]:
  for y in A[i+1:]:
    result += x * y
  i += 1

print(result.__mod__(10**9 + 7))
Problem p02570 (python)

Fixed submission:
D,T,S = map(int,input().split())
result = D / S
if T >= result:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
D,T,S = map(input().split())
result = D / S
if T <= result :
  print('Yes')
else:
  print('No')
Problem p02659 (python)

Fixed submission:
X , Y = input().split()
X = int(X)
Y = round(float(Y) * 100)
print((X * Y) // 100 )

Buggy submission (verdict: Runtime Error):
import math
X , Y = map(input().split())
X = int(X)
Y = float(Y)
print(math.floor(X * Y))
Problem p02693 (python)

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

if (k_under // k + ((k_under % k != 0) * 1)) * k > k_over:
    print('NG')
else:
    print('OK')

Buggy submission (verdict: Runtime Error):
k = int(input())
k_under, k_over = map(int,input(),split())
result　= 1
cnt = 0
while k * cnt > k_over:
	if k * cnt > k_under:
      print('OK')
      result = 0
    cnt += 1

if result == 1:
	print('NG')
Problem p03242 (python)

Fixed submission:
##### 解けた #####

n=list(map(int,list(input())))
no=[] # 出力

for ni in n:
    no.append(str(10-ni))

print("".join(no))

Buggy submission (verdict: Runtime Error):
##### 解けた #####

n=list(map(int,list(input())))
no=[] # 出力

for ni in n:
    no.append(10-ni)

print("".join(no))
Problem p02723 (python)

Fixed submission:
s = str(input())
if (s[2]==s[3]) and (s[4]==s[5]):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = str(input())
if (s[3]==s[4]) and (s[5]==s[6]):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = str(input())
if s[3]==s[4] and s[5]==s[6]:
  print("Yes")
else:
  print("No")
Problem p02777 (python)

Fixed submission:
s,t = map(str, input().split())
a,b = map(int, input().split())
u = str(input())

if s == u:
    print(a-1, b)
else:
    print(a, b-1)

Buggy submission (verdict: Runtime Error):
def ex_value(dice):
  return (1+dice)/2
def main():
  n,k = map(int, input().split())
  list_p = list(map(int, input().split()))
  list_ex_val = list(map(ex_value, list_p))
  print(max([sum(list_ex_val[i:i+k]) for i in range(n-k+1)]))
     
if __name__ == '__main__':
  main()

Buggy submission (verdict: Runtime Error):
def main():
    def ex_value(dice):
      n = 0
      for i in range(1,dice+1):
        n += i*1/dice
      return(n)
    n,k = map(int, input().split())
    list_p = list(map(int, input().split()))
    list_ex_val = list(map(ex_value, list_p))
    sum_k=[]
    for i in range(n-k+1):
        sum_k.append(sum(list_ex_val[i:i+k]))
    print(max(sum_k))

if __name__ == '__main__':
    main()
Problem p02699 (python)

Fixed submission:
a,b=map(int,input().split())
if b>=a:
    print("unsafe")
else:
    print("safe")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if b>=a:
  print("unsafe")
 else:
  print("safe")
Problem p02723 (python)

Fixed submission:
s=input()
if len(s)<6:
    print("No")
else:
    if s[2]==s[3] and s[4]==s[5]:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
s=input()
if len(s)<6:
  print("No")
else:
  if s[2]==s[3] and s[4]==s[5]:
    print("Yes")
    else:
      print("No")
Problem p02570 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
lst = list(map(int,input().split()))
val = 0
for i in range(len(lst)-1):
  for j in range(i+1,len(lst)):
    val += (lst[i]*lst[j])
print(val%((10**9)+7))
Problem p02676 (python)

Fixed submission:
limit = int(input())
string = input()

if limit < len(string):
    string = string[:limit] + '...'

print(string)

Buggy submission (verdict: Runtime Error):
limit = int(input())
string = input()

if limit < len(string):
    ans = string[:limit] + '...'

print(ans)

Buggy submission (verdict: Runtime Error):
limit = int(input())
string = input()

if limit <= len(string):
    ans = string[:limit] + '...'

print(ans)

Buggy submission (verdict: Runtime Error):
limit = int(input())
string = input()

if limit <= len(string):
    print(string[:7] + '...')
else:
    print(stirng)

Buggy submission (verdict: Runtime Error):
limit = int(input())
string = input()

if limit < len(string):
    print(string[:7] + '...')
else:
    print(stirng)
Problem p02570 (python)

Fixed submission:
def main():
    D, T, S = map(int, input().split())
    answer = solve(D, T, S)
    print(answer)


def solve(D, T, S):
    return 'Yes' if D <= S * T else 'No'


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from itertools import combinations

def main():
    N = int(input())
    A = tuple(map(int, input().split()))
    answer = solve(N, A)
    print(answer)


def solve(N, A):
    return sum(x * y for x, y in combinations(A, 2)) % (10**9 + 7)


if __name__ == "__main__":
    main()
Problem p02829 (python)

Fixed submission:
nums = [1,2,3]
a = int(input())
b = int(input())
c = 0

for i in nums:
  if int(i) != a and int(i) != b:
    c = int(i)
    
print(c)

Buggy submission (verdict: Runtime Error):
nums = [1,2,3]
a = int(input())
b = int(input())
c = 0

for i in nums:
  if i != a || i != b:
    c = i
    
print(c)

Buggy submission (verdict: Runtime Error):
nums = [1,2,3]
a = int(input())
b = int(input())
c = 0

for i in nums:
  if i != a && i != b:
    c = i
    
print(c)
Problem p02836 (python)

Fixed submission:
word = list(input())

count = 0  # 入れ替える個数を用意

if len(word) % 2 == 0:  # もしアルファベットの数が偶数の時
  for i in range(0,int(len(word)/2)):
    if word[i] != word[int(len(word))-1-i]:
      count += 1    
  print(count)

else:
  for j in range(0,int((len(word)+1)/2-1)):
    if word[j] != word[int(len(word))-1-j]:
      count += 1
  print(count)

Buggy submission (verdict: Runtime Error):
word = list(input())

count = 0  # 入れ替える個数を用意

if len(word) % 2 == 0:  # もしアルファベットの数が偶数の時
	for i in range(0,int(len(word)/2)):
    	if word[i] != word[int(len(word))-1-i]:
        	count += 1    
    print(count)

else:
	for j in range(0,int((len(word)+1)/2-1)):
    	if word[j] != word[int(len(word))-1-j]:
        	count += 1            
    print(count)

Buggy submission (verdict: Runtime Error):
word = list(input())

count = 0  # 入れ替える個数を用意

if len(word) % 2 == 0:  # もしアルファベットの数が偶数の時
	for i in range(0,int(len(word)/2)):
    	if word[i] != word[len(word)-1-i]:
        	count += 1    
    print(count)

else:
	for j in range(0,int((len(word)+1)/2-1)):
    	if word[j] != word[len(word)-1-j]:
        	count += 1            
    print(count)
Problem p02577 (python)

Fixed submission:
N= int(input())
if N%9 ==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N= int(input())
if N%9 =0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N= int(input())
if N%9 ==0
    print("Yes")
else:
    print("No")
Problem p02699 (python)

Fixed submission:
s, w = map(int, input().split())
if w >= s:
  print('unsafe')
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
s = int(input())
w = int(input())
if w >= s:
  print("unsafe")
else:
  print('safe')

Buggy submission (verdict: Runtime Error):
s = input()
w = input()
if w >= s:
  print("unsafe")
else:
  print('safe')
Problem p03834 (python)

Fixed submission:
a,b,c = input().split(",")
print(a,b,c)

Buggy submission (verdict: Runtime Error):
x,y,z = map(int,input().split())
print(z,x,y)
Problem p02570 (python)

Fixed submission:
D,T,S = map(int, input().split())
if D<=S*T:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
Sum = []
A = list(map(int, input().split()))
Sum = [A[i]*A[j] for j in range(N) for i in range(j)]
print(np.array(Sum).sum()%(1000000000+7))
Problem p02570 (python)

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

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
edge = []
for i in range(M):
    a,b = map(int,input().split())
    add = []
    for j in range(len(edge)):
        if a in edge[j] or b in edge[j]:
            edge[j].append(a)
            edge[j].append(b)
            add.append(j)
    if len(add) == 0:
        edge.append([a,b])
    elif len(add) >= 2:
        for j in range(1,len(add)):
            edge[add[0]].extend(edge[add[j]])
        for j in range(1,len(add)):
            edge.pop(add[j])
ans = 0
for i in range(len(edge)):
    x = list(set(edge[i]))
    if len(x) > ans:
        ans = len(x)
print(ans)
Problem p02689 (python)

Fixed submission:
temp = input().split(" ")
N = int(temp[0])
M = int(temp[1])
H = input().split(" ")
good = [1] * N
for i in range(M):
    root = input().split(" ")
    a = int(root[0])-1
    b = int(root[1])-1
    if int(H[a])>=int(H[b]):
        good[b] = 0
    if int(H[a])<=int(H[b]):
        good[a] = 0
print(sum(good))

Buggy submission (verdict: Runtime Error):
temp = input().split(" ")
N = int(temp[0])
M = int(temp[1])
H = input().split(" ")
good = [1] * N
for i in range(M):
    root = input().split(" ")
    a = int(root[0])-1
    b = int(root[1])-1
    if H[a]=>H[b]:
        good[b] = 0
    if H[a]<H[b]:
        good[a] = 0

print(sum(good))
Problem p02570 (python)

Fixed submission:
D, T, S = map(int, input().split())
print("Yes" if (D / S) <= T else "No")

Buggy submission (verdict: Runtime Error):
D, T, S = map(int, input.split())
if (D / S) <= T:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
D, T, S = map(int, input.split())
print("Yes" if (D / S) <= T else "No")
Problem p02699 (python)

Fixed submission:
S, W = map(int, input().split())
print("unsafe" if W >= S else "safe")

Buggy submission (verdict: Runtime Error):
S,W = map(int, input().split())
print "unsafe" if W >= S else "safe"

Buggy submission (verdict: Runtime Error):
S,W = map(int, input.split())
print "unsafe" if W >= S else "safe"
Problem p02570 (python)

Fixed submission:
D, T, S = list(map(int, input().split()))
if T*S >= D:
  print('Yes')
else: 
  print('No')

Buggy submission (verdict: Runtime Error):
D, T, S = map(int, input()).split()
if T*S <= D:
  print('Yes')
else: 
  print('No')
Problem p02577 (python)

Fixed submission:
N = int(input())
sumN = sum(int(digit) for digit in str(N))
if sumN%9 == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
sum = 0 
while(N != 0):
    sum += (N%10)
    N /= 10
if sum % 9 == 0:
    print('Yes')
else: 
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
sum = 0 
while(N != 0):
    sum += (N%10)
    N /= 10
if sum % 9 == 0:
    print('Yes')
else: print('No')
Problem p02676 (python)

Fixed submission:
K = int(input())
S = input()
if (len(S) <= K):
  print(S)
else: print(S[0:K] + '...')

Buggy submission (verdict: Runtime Error):
K = int(input())
S = raw_input()
if (len(S) == K):
  print(S)
else: print(S[0:K] + '...')

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()
if (len(S) == K):
  print(S)
else: print( S[0:K].join('...')
Problem p02699 (python)

Fixed submission:
s, w = map(int, input().split())
print("unsafe" if s<=w else "safe")

Buggy submission (verdict: Runtime Error):
s = int(input())
w = int(input())
if s <= w:
  print "unsafe"
else:
  print "safe"

Buggy submission (verdict: Runtime Error):
s, w = map(int, input().split())
if ( w >= s):
  print "unsafe"
else:
  print "safe"
Problem p02754 (python)

Fixed submission:
n, a, b = map(int, input().split())
period = a+b
times = n//period
k = n%period
n =  a if k >a else k
print(times*a + n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int (input())

if A == 0:
    print 0 
else: 
    print(  N - 2 )
Problem p02570 (python)

Fixed submission:
D, S, T = map(int, input().split())
print('Yes' if S * T >= D else 'No')

Buggy submission (verdict: Runtime Error):
import math
import itertools
import functools

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

for a, b in itertools.combinations(A, 2):
    if math.gcd(a, b) != 1:
        if functools.reduce(math.gcd, A) == 1:
            print('setwise coprime')
        else:
            print('not coprime')
        break
else:
    print('pairwise coprime')
Problem p03041 (python)

Fixed submission:
(n, k) = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

Buggy submission (verdict: Runtime Error):
(n, k) = map(int, input().split())
s = list(input())
s[k] = s[k].lower()
print("".join(s))
Problem p03127 (python)

Fixed submission:
def calc(a):
    m = min(a)
    b = [i % m for i in a if i % m != 0]
    if b:
        return calc(b+[m])
    else:
        return min(a)
      
_ = int(input())
print(calc(list(map(int, input().split()))))

Buggy submission (verdict: Runtime Error):
def calc(a):
    m = min(a)
    b = [i % m for i in a if i % m != 0]
    if b:
        return calc([*b, m])
    else:
        return min(a)
      
_ = int(input())
print(calc(list(map(int, input().split()))))

Buggy submission (verdict: Runtime Error):
def calc(a):
  m = min(a)
  b = [i % m for i in a if i % m != 0]
  if b:
    return calc([*b, m])
  else:
    return min(a)
      
if __name__ == "__main__":
  _ = int(input())
  print(calc(list(map(int, input().split()))))
Problem p03803 (python)

Fixed submission:
A, B = list(map(int, input().split()))
A = 14 if A == 1 else A
B = 14 if B == 1 else B
print('Alice' if A > B else 'Bob' if A < B else 'Draw')

Buggy submission (verdict: Runtime Error):
from itertools import combinations
N, Ma, Mb = list(map(int, input().split()))
abc = [list(map(int, input().split())) for _ in range(N)]
min_cost = -1
for _i in range(1, N+1):
    all_pattern = list(combinations(range(N), _i))
    for _j in all_pattern:
        _a = sum([abc[_k][0] for _k in _j])
        _b = sum([abc[_k][1] for _k in _j])
        _c = sum([abc[_k][2] for _k in _j])
        if _b * Ma == _a * Mb:
            if min_cost == -1 or min_cost > _c:
                min_cost = _c
print(min_cost)
Problem p02723 (python)

Fixed submission:
S = input()
if S[2]==S[3]:
    if S[4]==S[5]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = input()
if(S[4]==S[5] && S[6]==S[7]):
  print("Yes")
else:
  print("No")

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

if(S[4]==S[5] && S[6]==S[7]):
  print("Yes")
else:
  print("No")
Problem p02759 (python)

Fixed submission:
N = int(input())

if N % 2 == 0:
    print(N//2)
else:
    print(N//2+1)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
Output = [0] * N
num = ""

for i in range(M):
    s,c = map(int,input().split())
    if(Output[s-1]==0 or Output[s-1]>c):
        Output[s-1] = c
    if(c==0):
        print(-1)

if(Output[0]==0):
    print(-1)
else:
    for i in Output:
        if(i>9):
            print(-1)
        num += str(i)
    print(num)
Problem p02570 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
sum = 0
b = [i % (10**9+7) for i in a if i % (10**9+7) != 0]
# print(b)
for j in range(0,len(b)-1):
    for k in range(j+1,len(b)):
        c = b[j]*b[k]
        sum = sum + c
print(sum%(10**9+7))
Problem p02682 (python)

Fixed submission:
a, b, c, k = map(int, input().split())
if k <= a:
    print(k)
elif a < k <= a+b:
    print(a)
elif a+b <= k:
    print(a-(k-a-b))

Buggy submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())
A = [1]*a
B = [0]*b
C = [-1]*c
K = A+B+C
print(sum(K[0:k]))
Problem p02570 (python)

Fixed submission:
D, T, S = map(int,input().split())
if (D <= (T*S)):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
B = [0]*N

for i in range(N):
  A[i] = int(A[i])
  B[i] = A[i]*A[i]

print( ( ( (sum(A)*sum(A)) - sum(B) ) // 2 ) % ( 10**9 + 7 ) // 2 )
Problem p02577 (python)

Fixed submission:
if int(input()) % 9 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
if (int(input())%9 == 0:
    print("Yes")
else:
    print("No")
Problem p02578 (python)

Fixed submission:
N = int(input())
A = input().split()
count = 0
for i in range(N-1):
  if int(A[i]) > int(A[i+1]):
    count += int(A[i]) - int(A[i+1])
    A[i+1] = int(A[i])

print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
count = 0
for i in range(N-1):
  if A[i] > A[i+1]:
    count += A[i+1] - A[i]
    A[i+1] = A[i]

print(count)
Problem p02659 (python)

Fixed submission:
A,B = input().split()
a = int(A)
b1 = int(B[0])*100
b2 = int(B[2])*10
b3 = int(B[3])

answer = a*(b1+b2+b3) // 100
print(answer)

Buggy submission (verdict: Runtime Error):
A,B = map(float,input().split())
print(int(A*B)
Problem p02689 (python)

Fixed submission:
N,M = map(int,input().split())
H = input().split()
good = [1]*N
import collections

for i in range(M):
  a,b = map(int,input().split())
  if int(H[a-1]) > int(H[b-1]):
    good[b-1] = 0
  elif int(H[a-1]) < int(H[b-1]):
    good[a-1] = 0
  else:
    good[a-1] = 0
    good[b-1] = 0
    
c = collections.Counter(good)
print(c[1])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = input().split()
good = [1]*N
import collections

for i in range(M):
  a,b = map(int,input().split())
  if int(H[a-1]) >= int(H[b-1]):
    good[int(H[b-1])] = 0
  else:
    good[int(H[a-1])] = 0  
    
c = collections.Counter(good)
print(c[1])
Problem p02699 (python)

Fixed submission:
S,W = map (int,input().split())
if S > W:
  print("safe")
else :
  print("unsafe")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = []
count = 0
for i in range(N):
  S.append(input())

for i in range(0,N):
  if S[i] != '0':
    count += 1
    for j in range(i+1,N):
      if (S[j] != '0'):
        if S[i] == S[j]:
          S[j] = '0'
         
print (count)

Buggy submission (verdict: Runtime Error):
S,W = map (int12,input().split())
if S > W:
  print("safe")
else :
  print("unsafe")
Problem p02701 (python)

Fixed submission:
import collections

N = int(input())
S = []
count = 0
for i in range(N):
  S.append(input())

count = len(collections.Counter(S))
         
print (count)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = []
count = 0
for i in range(N):
  S.append(input())
  if S[i] != '0':
    count += 1
    for j in range(i+1,N):
      if (S[j] != '0'):
        if S[i] == S[j]:
          S[j] = '0'
         
print (count)
Problem p02707 (python)

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

import collections
c = collections.Counter(A)

for i in range(1,N+1):
    print(c[str(i)])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
c = collections.Counter(A)

import collections
for i in range(1,N+1):
    print(c[str(i)])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()

for i in range(1,N+1):
    print(A.count(str(i)))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
rank = []

for i in range(1,N+1):
    rank.append(A.count(i))
    


for i in range(0,N+1):
    print(rank[i])
Problem p02711 (python)

Fixed submission:
lucky = input()
a = int (lucky[0])
b = int (lucky[1])
c = int (lucky[2])
 
if (a == 7) or (b == 7) or (c == 7) :
    print ("Yes")
else :
    print ("No")

Buggy submission (verdict: Runtime Error):
lucky = input()
a = int (lucky[1])
b = int (lucky[2])
c = int (lucky[3])

if (a == 7) or (b == 7) or (c == 7) :
    print ("Yes")
else :
    print ("No")

Buggy submission (verdict: Runtime Error):
lucky = input()

for i in range(3)
	if int(lucky[i]) == 7 :
  		print ("Yes")
    else :
        print ("No")

Buggy submission (verdict: Runtime Error):
lucky = input()

for i in range(3)
	if int(lucky[i]) = 7 :
  		print ("Yes")
    else :
        print ("No")