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

Fixed submission:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def inc(n):
  ans = 0
  i = 1
  while True:
    if n - i >= 0:
      n -= i
      i += 1
      ans += 1
    else:
      break
  return ans

import collections

n = int(input())

c = collections.Counter(prime_factorize(n))

num = c.values()

ans = 0

for i in num:
  ans += inc(i)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

a,b = map(float,input().split())
ans = math.floor(a*b)
print(ans)
Problem p02678 (python)

Fixed submission:
n,m = map(int,input().split())
map_li = [[] for i in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    a,b = a-1,b-1
    map_li[a].append(b)
    map_li[b].append(a)

ans_li = [-1]*n
queue=[0]
visited = [False]*n

while queue:
    x = queue.pop(0)
    for g in map_li[x]:
        if visited[g]==False:
            queue.append(g)
            if ans_li[g]==-1:
                ans_li[g]=x
                visited[g]=True 
if -1 in ans_li[1:]:
    print('No')
else:
    print('Yes')
    for ans in ans_li[1:]:
        print(ans+1)

Buggy submission (verdict: Runtime Error):
from collections import deque
N,M = map(int,input().split())

G = [[] for i in range(M)]
for i in range(M):
  x,y = map(int,input().split())
  G[x-1].append(y-1)
  G[y-1].append(x-1)

dist = [-1]*N #全頂点を未訪問に初期化(-1)で未訪問
que = deque([0])   #初期条件 (頂点 0 を初期ノードとする) 
dist[0] = 0 #0を訪問済み

#BFS 開始 (キューが空になるまで探索を行う)
while que:
    v = que.popleft() #キューから先頭要素を取る
    d = dist[v]
    #v から辿れる頂点をすべて調べる
    for w in G[v]:
        if dist[w] > -1:#探索済みの頂点は無視
            continue
        dist[w] = d + 1 #新たな頂点wについて距離情報を更新してキューに追加する
        que.append(w)
# 結果出力 (各頂点の頂点 0 からの距離を見る)
print("Yes")
for i in range(N-1):
  print(dist[i+1])

Buggy submission (verdict: Runtime Error):
from collections import deque
N,M = map(int,input().split())

G = [[] for i in range(M)]
for i in range(M):
  x,y = map(int,input().split())
  G[x-1].append(y-1)
  G[y-1].append(x-1)

dist = [-1]*N #全頂点を未訪問に初期化(-1)で未訪問
que = deque([0])   #初期条件 (頂点 0 を初期ノードとする) 
dist[0] = 0 #0を訪問済み

#BFS 開始 (キューが空になるまで探索を行う)
while que:
    v = que.popleft() #キューから先頭要素を取る
    d = dist[v]
    #v から辿れる頂点をすべて調べる
    for w in G[v]:
        if dist[w] > -1:#探索済みの頂点は無視
            continue
        dist[w] = d + 1 #新たな頂点wについて距離情報を更新してキューに追加する
        que.append(w)
# 結果出力 (各頂点の頂点 0 からの距離を見る)
for i in range(N-1):
  print("Yes")
  print(dist[i+1])

Buggy submission (verdict: Runtime Error):
from collections import deque
n,m = map(int,input().split())
map_li = [[] for i in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    a,b = a-1,b-1
    map_li[a].append(b)
    map_li[b].append(a)

ans_li = [-1]*n
queue=deque([0])
visited = [False]*n

while queue:
    x = queue.pop(0)
    for g in map_li[x]:
        if visited[g]==False:
            queue.append(g)
            if ans_li[g]==-1:
                ans_li[g]=x
                visited[g]=True 
if -1 in ans_li[1:]:
    print('No')
else:
    print('Yes')
    for ans in ans_li[1:]:
        print(ans+1)
Problem p02700 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
 
while a>0 and c>0:
  if c>0:
    c += -b
    
  if c<=0:
    print("Yes")
    break
    
    
  if a>0:
    a += -d
    
  if a<=0:
    print("No")
    break

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

while a>0 and c>0:
  if c>0:
    c += -b
    
  if c<=0:
    break
    print("Yes")
    
  if a>0:
    a += -d
    
  if a<=0:
    break
    print("No")

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

while True:
if a>0 and c>0:
    c -= b
    if a>0 and c>0:
      a -= d
      
else:
  break
  
if a>c:
  print("Yes")
else:
  print("No")

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

while (a<=0) or (c<=0):
  if c>0:
    c -= b
  else:
    break
   
  if a>0:  
    a -= d
  else:
    break
  
else:
  break

if a>=0:
  print("Yes")
else:
  print("No")
Problem p02717 (python)

Fixed submission:
X,Y,Z=list(map(int,input().split()))

print(Z, X, Y)

Buggy submission (verdict: Runtime Error):
X,Y,Z = intput().split()

print(Z,X,Y)

Buggy submission (verdict: Runtime Error):
X,Y,Z = map(str,intput().split())

print(Z,X,Y)

Buggy submission (verdict: Runtime Error):
X,Y,Z=map(int,input().split()))

print(Z, X, Y)

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())

print(Z, X, Y)

Buggy submission (verdict: Runtime Error):
X = input()
Y = input()
Z = input()

print(Z, X ,Y)
Problem p02718 (python)

Fixed submission:
N, M = map(int,input().split())
l = list(map(int,input().split()))
 
T = sum(l)
V = 1/(4*M) * T
S = len(list(filter(lambda x: x>=V, l)) )
 
print( "Yes" if S >= M else "No" )

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A_i = list(map(int,input().solit()))
sum_A_i = sum(A_i)
X = 0

for i in A_i:
  if i > sum_A_i/(4*M):
    x += 1
    
  if x >=M:
    print("Yes")
  else:
    print("No")
Problem p02742 (python)

Fixed submission:
import math
h,w = map(int,input().split())
ans = 0

if h == 1 or w ==1 :
  ans += 1

else:
    #奇数行目+偶数行目
    ans += math.ceil(h/2)*math.ceil(w/2)+(h//2)*(w//2)
 
print(ans)

Buggy submission (verdict: Runtime Error):
import math
h,w = map(int,input().split())
ans = 0

if h == 1 or w ==1:
  ans += 1

elif:
    #奇数行目+偶数行目
    ans += math.ceil(h/2)*math.ceil(w/2)+(h//2)*(w//2)
 
print(ans)
Problem p02755 (python)

Fixed submission:
a,b = map(int,input().split())
ans = -1 
  
for i in range(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 == a and tax2 == b:
    ans = i
print(ans)

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

for i in range(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 = a and tax2 == b:
    ans = i
print(ans)

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

for i in range(10000,-1,-1):
  tax1 = int(i*0.08)
  tax2 = int(i*0.1)
  if tax1 = a and tax2 == b:
    print(i)
Problem p02760 (python)

Fixed submission:
a1= list(map(int,input().split()))
a2= list(map(int,input().split()))
a3= list(map(int,input().split()))
a = a1 + a2 + a3
 
n = int(input())
 
#bがaにあるか確認して0へ
for _ in range(n):
  b = int(input())
  if b in a:
    a[a.index(b)]=0
  
  
check = 0
for i in range(3):
  #縦横のbingo検索
  if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]):
        check+=1
#ななめ
if (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]):
    check+=1
if check>0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a1= list(map(int,input().solit()))
a2= list(map(int,input().solit()))
a3= list(map(int,input().solit()))
a = a1 + a2 + a3

n = int(input())

#bがaにあるか確認して0へ
for _ in range(n):
  b = int(input())
  if b in a:
    a[a.index(b)]=0
  
  
check = 0
for i in range(3):
  #縦横のbingo検索
  if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]):
        check+=1
#ななめ
if (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]):
    check+=1
if check>0:
    print("Yes")
else:
    print("No")
Problem p02778 (python)

Fixed submission:
s = input()
S = len(s)

print("x"*S)

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

print(x*S)
Problem p02811 (python)

Fixed submission:
K,X = map(int,(input().split()))
if 500*K >= X:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
K = int(input())
X = int(input())

if 500*K >= X:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
K = int(input())
X = int(input())

if 500*x >= X:
    print("Yes")
else:
    print("No")
Problem p02817 (python)

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

print(T,S,sep="")

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

print(T,S,sep="")

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

print(T + S)

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

print(T + S)

Buggy submission (verdict: Runtime Error):
S = srt(input())
T = str(input())

print(T + S)
Problem p02818 (python)

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


if a>= k:
    print(a-k,b)
elif a+b>=k:
    print(0,a+b-k)
else:
    print(0,0)

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


if a>= K:
    print(a-k,b)
elif a+b>=k:
    print(0,a+b-k)
else:
     print(0,0)
Problem p02830 (python)

Fixed submission:
N = int(input())
S,T = input().split()
ans = ""
 
for i in range(N):
    ans += S[i]+T[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(input())
T = str(input())
ans = ""

for i in range(N):
    ans += S[i]+T[i]
print(str(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
T = input()
ans = ""

for i in range(N):
    ans += S[i]+T[i]
print(str(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
T = input()
ans = ""

for i in range(N):
    ans += S[i]+T[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
T = input()
ans = ""

for i in range(N):
    ans += S[i]+T[i]
print(ans)
Problem p02898 (python)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))
ans = 0
for i in range(n):
  if h[i]>=k:
    ans += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(int,input().split())
ans = 0
for i in range(n):
  if h[i]>=k:
    ans += 1
    
print(ans)
Problem p02899 (python)

Fixed submission:
n = int(input())
student = list(map(int,input().split()))
a = [0]*n
 
for i in range(n):
  s = student[i] #生徒が出席した番号をメモ
  a[s-1] = i+1
  
print(*a)

Buggy submission (verdict: Runtime Error):
n = int(input())
student = list(map(int,input().split()))
a = [0]*n
 
for i in range(n):
  s = student[i] #生徒が出席した番号をメモ
  a[s-1] = i+1
  
print(*ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
student = list(map(int,input().split()))
a = [0]*n

for i in range(n):
  s = student[i] #生徒が出席した番号をメモ
  a[s-1] = i+1
  
print(ans)
Problem p02909 (python)

Fixed submission:
s = input()
if s == "Sunny":
  print("Cloudy")
elif s == "Cloudy":
  print("Rainy")
else:
  print("Sunny")

Buggy submission (verdict: Runtime Error):

s = input()
if s = "Sunny":
  print("Cloudy")
elif s = "Cloudy":
  print("Rainly")
else:
  print("Sunny")
Problem p02993 (python)

Fixed submission:
s =input()
 
for i in range(1,4):
  if s[i-1]==s[i]:
    print("Bad")
    exit()
print("Good")

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

for i in range(1,4):
  if s[i-1]==s[i]:
    print("Bad")
    exit()
print("Good")
Problem p02995 (python)

Fixed submission:
from fractions import gcd
a,b,c,d = map(int,input().split())
cd = gcd(c,d)

#A-1
A1 = (a-1) - (a-1)//c -(a-1)//d +(a-1)//(c*d//cd)
 
#Bまで
B = b - b//c - b//d +b//(c*d//cd)
 
print(B-A1)

Buggy submission (verdict: Runtime Error):
import math
a,b,c,d = map(int,input().split())

#A-1
A1 = (a-1) - (a-1)//c -(a-1)b//d +c*d//(gcd(c,d))*(a-1)

#Bまで
B = b - b//c - b//d +c*d//(gcd(c,d)) *b

print(B-A1)
Problem p02996 (python)

Fixed submission:
n = int(input())

A = []
B = []
for i in range(n):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

C = zip(B, A)
C = sorted(C)
B, A = zip(*C)

ans = 1
t = 0
for i, j in zip(A, B):
    t += i
    if t <= j:
        continue
    else:
        print("No")
        ans = 0
        break
if ans:
    print("Yes")

Buggy submission (verdict: Runtime Error):
 int(input())
 
A = []
B = []
for i in range(n):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
 
C = zip(B, A)
C = sorted(C)
B, A = zip(*C)
 
ans = 1
t = 0
for i, j in zip(A, B):
    t += i
    if t <= j:
        continue
    else:
        print("No")
        ans = 0
        break
if ans:
    print("Yes")
Problem p03037 (python)

Fixed submission:
n,m = map(int,input().split())
ll = []
rl = []
 
for i in range(m):
  l,r = list(map(int,input().split()))
  ll.append(l)
  rl.append(r)
  
if min(rl)<max(ll):
  print("0")
 
else:
  print(abs(min(rl)-max(ll)+1))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
ll = []
rl = []

for i in range(m):
  l,r = list(map(int,input().split()))
  ll.append(l)
  rl.append(r)
  
if min(rr)<max(ll):
  print("0")

else:
  print(abs(max(rr)-min(ll)+1))
Problem p03071 (python)

Fixed submission:
a,b = map(int,input().split())
ans = 0
for i in range(2):
  if a>=b:
    ans += a
    a -= 1
  else:
    ans += b
    b -= 1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
ans = 0
for i in range(N):
  if a>=b:
    ans += a
    a -= 1
  else:
    ans += b
    b -= 1
print(ans)
Problem p03085 (python)

Fixed submission:
n = input()

if n == "A":
  print("T")
if n == "T":
  print("A")
if n == "G":
  print("C")
if n =="C":
  print("G")

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

if n == "A":
  print("T")
if n == "T":
  print("A")
if n == "G":
  print("C")
if n =="C":
  print(G)
Problem p03102 (python)

Fixed submission:
n, m, c  = map(int, input().split())
b = list(map(int, input().split()))
s = 0
for i in range(n):
    a = list(map(int, input().split()))
    t = 0
    for j in range(m):
        t += a[j]*b[j]
    if t+c > 0:
        s += 1
print(s)

Buggy submission (verdict: Runtime Error):
n,m,c = map(int,input().split())
B = map(int,input().split())
A = []
ans = 0
for i in range(m):
  a = map(int,input().split())
  A.append(a)

sum = c
for i in range(n):
    for j in range(m):
        sum += A[i][j]*B[j]
    if sum > 0:
        ans += 1
        sum = c
print(ans)
Problem p03146 (python)

Fixed submission:
s = int(input())
ans = [s]
 
while True:
  if s%2 ==0:
    s = s//2
  else:
    s = 3*s + 1
 
  if s in ans:
        break
  else:
        ans.append(s)
      
print(len(ans)+1)

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

ans = [s]
 
while True:
  if s%2 ==0:
    s = s//2
  else:
    s = 3s + 1
 
  if s in ans:
        break
  else:
        ans.append(s)

Buggy submission (verdict: Runtime Error):
s = int(input())
a = list(map(int,input().split()))
ans = [s]

while True:
  if s%2 ==0:
    s = s//2
  else:
    s = 3s + 1

  if s in ans:
        break
  else:
        ans.append(s)
      
print(len(ans)+1)
Problem p03160 (python)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
 
a = [0 for _ in range(n)]
a[1] = abs(h[1] - h[0])
 
for i in range(2,n):
    a[i] = min(a[i-1]+abs(h[i]-h[i-1]), a[i-2]+abs(h[i]-h[i-2]))
    
print(a[-1])

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(int,input().split())
inf = float("inf")
dp =[inf for i in range(n)]
dp[0] = 0
dp[1] = h[1]
for i in range(2,n):
  dp[i] = min(dp[i-1],dp[i-2])+h[i]
  
print(dp[-1])
Problem p03197 (python)

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
print("second" if all(i % 2 == 0 for i in a) else "first")

Buggy submission (verdict: Runtime Error):
print('second' if all(a[i] % 2 == 0 for i in range(N)) else 'first')
Problem p03351 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
flag = False
if abs(c-a)<=d:
  flag = True
elif abs(b-a)<=d and abs(c-b)<=d:
  flag = True

if flag:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x = int(input())
if x == 1:
  print("1")
  exit()
  
ans = 0
for b in range(2,int(x**(1/2)+1)):
  for p in range(2,1000):
    tmp = pow(b,p)
    if tmp<=x:
      ans = max(ans,pow(b,p))
    else:
      break
      
print(ans)
Problem p03359 (python)

Fixed submission:
a,b = map(int,input().split())
if a<=b:
  print(a)
else:
  print(a-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input.split())
if a==i and b==1:
  print(1)
else:
  print(min(a,b)-1)
Problem p03369 (python)

Fixed submission:
S = input()
print(700 + S.count("o")*100)

Buggy submission (verdict: Runtime Error):
S = input()
print(700 + count("1")*100)
Problem p03380 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
 
m = max(a)
a = sorted(a)
 
ans = 0
 
for i in a:
    if abs(m/2-i) < abs(m/2-ans):
        ans = i
 
print(m, ans)

Buggy submission (verdict: Runtime Error):
import bisect
n = int(input())
A = sorted(list(map(int,input().splitfrom math import factorial
import bisect
import sys
n = int(input())
A = sorted(list(map(int,input().split())))
           
max1 = A[-1]
half = A[-1]//2

point = bisect.bisect_left(A, half)

if A[point] == A[-1]:
  print(A[-1],A[-2])
  sys.exit()

a1 = factorial(max1) / factorial(A[point]) / factorial(max1 - A[point])
a2 = factorial(max1) / factorial(A[point+1]) / factorial(max1 - A[point+1])
if a1>=a2:
  print(max1,A[point])
else:
  print(max1,A[point+1])
Problem p03433 (python)

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

if N-(N//500)*500 <=A:
    print("Yes")
else:
    print("No")

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

if N < (N//500)*500-A :
    print("Yes")
else:
    print("No")

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

B = N % 500
 if B > A:
    print("Yes")
else:
    print("No")
Problem p03447 (python)

Fixed submission:
x=int(input())
a= int(input())
b = int(input())
print((x-a)%b)

Buggy submission (verdict: Runtime Error):
x,a,b=map(int,input().split())
print((x-a)%b)
Problem p03448 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0

for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500*i+100*j+50*k == X:
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A, B, C, X = map(int,input().split())
count = 0

for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500*i+100*j+50*k == X:
                count += 1
print(count)
Problem p03456 (python)

Fixed submission:
import math
a, b = map(str,input().split())
c = int(a+ b)
 
if   math.sqrt(c).is_integer() == True:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import math
a, b = input().split())
c = int(a+ b)
 
if math.sqrt(c).is_integer() == True:
    print('Yes')
else:
    print('No')
Problem p03469 (python)

Fixed submission:
S = input().split("/")
S[0]= "2018"
print("/".join(S))

Buggy submission (verdict: Runtime Error):
S = input()
S[0]= 2018
print("/".join(S))
Problem p03470 (python)

Fixed submission:
N = int(input())
mochi = []
for i in range(N):
  a = int(input())
  if not a in mochi:
    mochi.append(a)
    
mochi.sort()
print(len(mochi))

Buggy submission (verdict: Runtime Error):
N = int(input())
mochi = []
for i in range(N):
  a = int(input())
  if not a in mochi:
    mochi.append(a)
    
mochi.sorted()
print(len(mochi))
Problem p03474 (python)

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

 
if s.count("-") ==1:
  s1,s2 = s.split("-")
  if a == len(s1) and b == len(s2):
    print("Yes")
  else:
    print("No")
 
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = input()
s1,s2 = s.split("-")
 
if s.count("-") ==1:
  if a == len(s1) and b == len(s2):
    print("Yes")
  else:
    print("No")

else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = input()
s1,s2 = s.split("-")

if s.count("-") ==1:
  if a == len(s1) and b == len(s2):
    print("Yes")
  else:
    print("No")
Problem p03485 (python)

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

print((a+b+1)//2)

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

average = (a+b)/2

print(math.ceil(average)
Problem p03487 (python)

Fixed submission:
import collections
N = int(input())
a = sorted(list(map(int,input().split())))
c = collections.Counter(a)
cnt = 0
for i in c.most_common():
   # print(i)
    if i[0]<i[1]:
      cnt=cnt+i[1]-i[0]
    if i[0]>i[1]:
      cnt=cnt+i[1]
print(cnt)

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
a = sorted(list(map(int,input().split())))
A =  collections.Counter(a)
cnt = 0
for i in A:
   # print(i)
    if i[0]<i[1]:
      cnt=cnt+i[1]-i[0]
    if i[0]>i[1]:
      cnt=cnt+i[1]
print(cnt)
Problem p03493 (python)

Fixed submission:
N = input()
 
print(N.count("1"))

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

print(N.count(1))

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().spilt())
n = 0

if a == 1:
    n += 1
else:
    pass
if b == 1:
    n += 1
else:
    pass
if c == 1:
    n += 1
else:
    pass

print(n)
Problem p03494 (python)

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

while 1:
    #すべてが偶数か確認
    for i in range(N):
        if A[i] % 2 == 0:
            continue
        else:
            F = 1
    
    if F == 1 : break 

    for i in range(N):
        A[i] = A[i]/2
    n += 1


print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

while can:
    for i in range(N):
        if A[i]%2 != 0:
            can = False
            break

        elif A[i]%2 == 0:         
            A[i] = A[i] // 2
            n += 1

        elif:
            can = False
            break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

while can:
    for i in range(N):
        if A[i]%2 != 0:
            can = False
            break

   if A[i]%2 == 0:         
            A[i] = A[i] // 2
            n += 1

    elif:
        can = False
        break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

while can:

    for i in range(N):
        if A[i]%2 != 0:
            can = False
            break

       elif A[i]%2 == 0:         
            A[i] = A[i] // 2
            n += 1

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

while can:

    for i in range(N):
        if A[i]%2 == 1:
            can = False
            break

       elif A[i]%2 == 0:         
            A[i] = A[i] // 2
            n += 1

        else:
            can = False
            break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

while can:
    for i in range(N):
        if A[i]%2 == 0:
            A[i] = int(A[i]/2)
            n += 1

       else:
            can = False
            break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

while can:
    n += 1
    for i in range(N):
        if A[i]%2 == 0:
            A[i] = (A[i]/2)
 
       else:
            can = False
            break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = map(int,input().split())
n = 0
can = True

while can:
    for i in range(N):
        if A[i]%2 == 0:
            A[i] = (A[i]/2)
            n += 1
        else:
            break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = map(int,input().split())
n = 0
can = True

while can:
    for i in range(N):
        if A[i]%2 == 0:
            A[i] = (A[i]/2)
            n += 0
        else:
            break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = map(int,input().split())
n = 0
can = True

while can:
    for i in range(N):
        if A[i]%2 == 0:
            A[i] = (A[i]/2)
            n += 0
    else:
        break

print(n)