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

Fixed submission:
N, M, Q = map(int, input().split())
check = list()
for i in range(Q):
  check.append(list(map(int, input().split())))
ans = 0

for i1 in range(1, M+1):
  for i2 in range(i1, M+1):
    for i3 in range(i2, M+1):
      for i4 in range(i3, M+1):
        for i5 in range(i4, M+1):
          for i6 in range(i5, M+1):
            for i7 in range(i6, M+1):
              for i8 in range(i7, M+1):
                for i9 in range(i8, M+1):
                  L = [1, i1, i2, i3, i4, i5, i6, i7, i8, i9]
                  A = list()
                  for i in range(N):
                    A.append(L[i])
                  tmp = 0
                  for i in range(Q):
                    a = check[i][0]
                    b = check[i][1]
                    c = check[i][2]
                    d = check[i][3]
                    if(A[b-1]-A[a-1] == c):
                      tmp += d
                  ans = max(ans, tmp)

print(ans)

Buggy submission (verdict: Runtime Error):
N, M, Q = map(int, input().split())
check = list()
for i in range(Q):
  check.append(list(map(int, input().split())))
ans = 0

for i1 in range(1, M+1):
  for i2 in range(i1, M+1):
    for i3 in range(i2, M+1):
      for i4 in range(i3, M+1):
        for i5 in range(i4, M+1):
          for i6 in range(i5, M+1):
            for i7 in range(i6, M+1):
              for i8 in range(i7, M+1):
                for i9 in range(i8, M+1):
                  L = [1, i1, i2, i3, i4, i5, i6, i7, i8, i9]
                  A = list()
                  for i in range(M):
                    A.append(L[i])
                  tmp = 0
                  for i in range(Q):
                    a = check[i][0]
                    b = check[i][1]
                    c = check[i][2]
                    d = check[i][3]
                    if(A[b-1]-A[a-1] == c):
                      tmp += d
                  ans = max(ans, tmp)

print(ans)
Problem p03013 (python)

Fixed submission:
N, M = map(int, input().split())
A = set([int(input()) for _ in range(M)])
mod = 10**9 + 7
ans = [0] * (N+1)
ans[0] = 1
ans[1] = 1 if 1 not in A else 0
for i in range(2, N+1):
  ans[i] = (ans[i-1]+ans[i-2])%mod if i not in A else 0
print(ans[N])

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = set([int(input()) for _ in range(M)])
mod = 10**9 + 7
ans = [0] * (N+1)
ans[0] = 1
ans[1] = 1 if i not in a else 0
for i in range(2, N+1):
  ans[i] = (ans[i-1]+ans[i-2])%mod if i not in a else 0
print(ans[N])
Problem p03041 (python)

Fixed submission:
N, K = map(int, input().split())
S = input()
if(S[K-1] == 'A'):
  S = S[:(K-1)] + 'a' + S[K:]
elif(S[K-1] == 'B'):
  S = S[:(K-1)] + 'b' + S[K:]
else:
  S = S[:(K-1)] + 'c' + S[K:]
print(S)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = input()
if(S[K-1] == 'A'):
  S[K-1] = 'a'
elif(S[K-1] == 'B'):
  S[K-1] = 'b'
else:
  S[K-1] = 'c'
print(S)
Problem p03107 (python)

Fixed submission:
S = input()
zero = S.count('0')
one = S.count('1')
print(min(zero,one)*2)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
zero = S.count('0')
one = S.count('1')
print(min(zero,one)*2)
Problem p03634 (python)

Fixed submission:
import sys
sys.setrecursionlimit(500000)
 
N = int(input())
ABC = [list(map(int, input().split())) for i in range(N-1)]
Q, K = map(int, input().split())
D = [0] * (N+1)
L = [[] for i in range(N+1)]
for a, b, c in ABC:
    L[a].append([b, c])
    L[b].append([a, c])
 
 
def dfs(n, np):
    for nc in L[n]:
        if nc[0] == np:
            continue
        else:
            D[nc[0]] = D[n] + nc[1]
            dfs(nc[0], n)
 
 
dfs(K, 0)
for i in range(Q):
    x, y = map(int, input().split())
    print(D[x] + D[y])

Buggy submission (verdict: Runtime Error):
N = int(input())
ABC = [list(map(int, input().split())) for i in range(N-1)]
Q, K = map(int, input().split())
D = [0] * (N+1)
L = [[] for i in range(N+1)]
for a, b, c in ABC:
    L[a].append([b, c])
    L[b].append([a, c])
 
 
def dfs(n, np):
    for nc in L[n]:
        if nc[0] == np:
            continue
        else:
            D[nc[0]] = D[n] + nc[1]
            dfs(nc[0], n)
 
 
dfs(K, 0)
for i in range(Q):
    x, y = map(int, input().split())
    print(D[x] + D[y])

Buggy submission (verdict: Runtime Error):
N = int(input())
graph = [[] for _ in range(N+1)] #木構造を入れておく
long = [0] * (N+1) #Kから任意のノードまでの距離

for i in range(N-1):
  x, y, z = map(int, input().split())
  graph[x].append([y, z])
  graph[y].append([x, z])
  
Q, K = map(int, input().split())
def dfs(n, num):
    for t in graph[n]:
        if t[0] == num:
            continue
        else:
            long[t[0]] = long[n] + t[1]
            dfs(t[0], n)
 
 
dfs(K, 0)

for i in range(Q):
  x_i, y_i = map(int, input().split())
  ans = long[x_i] + long[y_i]
  print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
graph = [[] for _ in range(N+1)] #木構造を入れておく
long = [0] * (N+1) #Kから任意のノードまでの距離

for i in range(N-1):
  x, y, z = map(int, input().split())
  graph[x].append([y, z])
  graph[y].append([x, z])
  
Q, K = map(int, input().split())
x = list()
y = list()

for i in range(Q):
  x_i, y_i = map(int, input().split())
  x.append(x_i)
  y.append(y_i)

       
def dfs(n, np):
    for nc in graph[n]:
        if nc[0] == np:
            continue
        else:
            long[nc[0]] = long[n] + nc[1]
            dfs(nc[0], n)
 
 
dfs(K, 0)

for i in range(Q):
  ans = long[x[i]] + long[y[i]]
  print(ans)
Problem p02570 (python)

Fixed submission:
inputValue=input()

l=inputValue.split(" ")
D=int(l[0])
T=int(l[1])
S=int(l[2])

if (D/float(S))<=T:
	print ("Yes")
else:
	print("No")

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

l=inputValue.split(" ")
d=int(l[0])
t=int(l[1])
s=int(l[2])

if (d/float(s))<=t:
	print "Yes"
else:
	print"No"
Problem p02766 (python)

Fixed submission:
count = 0       #初期値を0とするcount変数を作る.
n,k = map(int,input().split())      #整数とn進数を入力する。

while n > 0:         #nをkで割った商が0になるまでcountに1を足し続ける。
    count += 1
    n //= k

print(count)

Buggy submission (verdict: Runtime Error):
ount = 0       #初期値を0とするcount変数を作る.
n,k = map(int,input().split())      #整数とn進数を入力する。

while True:         #nをkで割った商が0になるまでcountに1を足し続ける。
    count = count +1
    n = n // k
    if n == 0:
        break

print(count)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input())
lis = []

while n / k == 0:
    if n >k：
        lis.append(int(n % k))
        ing_total += 1
    else:
        if n >= 10:
            ing_total = 2
        else:
            ing_total = 1

print(ing_total)
Problem p02771 (python)

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

s = set([a,b,c])

if len(s) == 2:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
admission = []
n = int(input())
admission.append(map(int,input().split()))

for i in range(n):
    if admission[n] % 2 == 0:
        if admission[n] % 3 == 0 or admission[n] % 5 == 0:
            print("APPROVED")
        else:
            print("DENIED")

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

sum_distance = set(["a","b","c"])

if len(sum_distance) == 2:
    print("Yes)
else:
    print("No")

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

s = set(["a","b","c"])

if len(s) == 2:
    print("Yes)
else:
    print("No")

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

s = set([a,b,c)]

if len(s) == 2:
    print("Yes)
else:
    print("No")

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

a = set(a,b,c)

if len(a) == 2:
    print("Yes)
else:
    print("No")

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

s = set([a,b,c])

if len(s) = 2:
  print("Yes")
else:
  print("No")

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

s = set(["a","b","c"])

if len(s) = 2:
  print("Yes")
else:
  print("No")

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

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

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

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

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

if a != b:
  if b==c:
    print("Yes")
  else:
    print("No")
elif a == b:
  print("Yes")
else:
  print("Yes")
Problem p02777 (python)

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

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

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

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

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

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

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

if s == u and not t == u:
    gap = a -1
    print(int(gap),b)
else:
    gap = b -1
    print(a,int(gap))

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

if s = u and not t = u:
    gap = a -1
    print(int(gap),b)
else:
    gap = b -1
    print(a,int(gap))s

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

if s = u and not t = u:
    gap = a -1
    print(int(gap))
else:
    gap = b -1
    print(int(gap))s

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

if s = u:
  ball_gap = a -1
  print(ball_gap)
elif t = u:
  ball_gap = b -1
  print(ball_gap)
Problem p02790 (python)

Fixed submission:
a,b = input().split()
A = int(a * int(b))
B = int(b * int(a))

if A >= B:
    print(str(A))
else:
    print(str(B))

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

lis=[A,B]
true_list = lis.sort()
print(str(true_list[0]))

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

lis=[A,B]
true_list = lis.sort(reverse=True)
print(true_list[0])

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

lis=[A,B]
true_list = lis.sort()
print(true_list[0])
Problem p02829 (python)

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

al.remove(a)
al.remove(b)
print(al[0])

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

remain = al.remove(a)
remain = al.remove(b)
print(remain[0])

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

remain = al.remove(a)
re_remain = remain.remove(b)
print(re_remain[0])

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

remain = al.remove(a)
re_remain = remain.remove(b)
print(re_remain)

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

remain = al.remove(a,b)

print(remain)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
al = list([1,2,3])

remain = al.remove(a,b)

print(remain)
Problem p02847 (python)

Fixed submission:
s = input()
lis = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

ans = 7 - lis.index(s)
print(ans)

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

for ss in s:
    i = ord(ss)
    i += n
    if i > 90:
        i -= 26
    ss = chr(i)
    print(ss,end="")

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

for ss in s:
    i = ord(ss)
    i += n
    if i > 90:
        i -= 26
    ss = chr(i)
    print(ss,end="")

Buggy submission (verdict: Runtime Error):
day = input()
next_sunday = {1:"SAT",2:"FRI",3:"THU",4:"WED",5:"TUE",6:"MON",7:"SUN"}
value = next_sunday[day]
print(value)

Buggy submission (verdict: Runtime Error):
day_ = input()
next_sunday = {7:"SUN",6:"MON",5:"TUE",4:"WED",3:"THU",2:"FRI",1:"SAT"}
value = next_sunday[day_]
print(value)
Problem p02897 (python)

Fixed submission:
n = int(input())

if n % 2 == 0:
    print(1/2)
else:
    pro = int(n/2) +1
    print(pro/n)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())

if n % 2 == 0:
    print(1/2)
else:
    pro = math.floor(n /2) +1
    print(pro/
Problem p02915 (python)

Fixed submission:
print(int(input())**3)

Buggy submission (verdict: Runtime Error):
print(int()input()*3)
Problem p02987 (python)

Fixed submission:
s = input()

if s.count(s[0]) == 2 and s.count(s[1])==2 and s.count(s[2])==2:
    print("Yes")
else:
    print("No")

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

if s.count(s[0]) == 2 and s.count(s[1])==2 and s.count(as2])==2:
    print("Yes")
else:
    print("No")

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

if s.count(a[0]) == 2 and s.count(a[1])==2 and s.count(a[2])==2:
    print("Yes")
else:
    print("No")

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

if s.count(a[0]) == 2 and a.count(a[1])==2 and a.count(a[2])==2:
    print("Yes")
else:
    print("No")
Problem p03135 (python)

Fixed submission:
t,x = map(int,input().split())

print(t/x)

Buggy submission (verdict: Runtime Error):
8 3
Problem p03315 (python)

Fixed submission:
s = input()
total = 0
for i in s:
    if i == '+':
        total+=1
    else:
        total-=1
    

print(total)

Buggy submission (verdict: Runtime Error):
n = input()
plus = n.count('+')
minus = n.count('-')
print(plus_minus)
Problem p02777 (python)

Fixed submission:
S,T = input().split()
A,B = input().split()
U = input()
if U == S:
    A = int(A)-1
else:
    B = int(B)-1
print(str(A)+' '+str(B))

Buggy submission (verdict: Runtime Error):
N = int(input())
 A = [int(x) for x in input().split()]
for i in A:
   	if A.count(i) >= 2:
   	   print('YES')
       return
print('NO')

Buggy submission (verdict: Runtime Error):
S,T = input().split()
A,B = input().split()
U = input()
if U == S:
    A = int(A)-1
else:
    B = int(B)-1
print(str(A)+' '+str(B))
Problem p02779 (python)

Fixed submission:
N = int(input())
A = [int(x) for x in input().split()]
mySet = set()
for i in A:
  if i in mySet:
    print('NO')
    exit()
  else:
      mySet.add(i)
print('YES')

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(x) for x in input().split()]
mySet = set()
for i in A:
  if i in mySet:
    print('NO')
    exit()
    else:
      mySet.add(i)
print('YES')

Buggy submission (verdict: Runtime Error):
 N = int(input())
 A = [int(x) for x in input().split()]
for i in A:
   	if A.count(i) >= 2:
   	   print('YES')
       return
print('NO')
Problem p02578 (python)

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

dai=[0 for _ in range(A)]

for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    B[i]+=B[i-1]-B[i]

print(sum(dai))

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

dai=[0, 0, 0, 0, 0]
for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    B[i]+=B[i-1]-B[i]

print(sum(dai))

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

dai=[0, 0, 0, 0, 0]
for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    
print(sum(dai))

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

dai=[0, 0, 0, 0, 0]
for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    #B[i]+=B[i-1]-B[i]
    
print(sum(dai))
Problem p02701 (python)

Fixed submission:
num = int(input())

set_ = []
for i in range(num):
  a = input()
  set_.append(a)
  
print(len(set(set_)))

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

set_ = []
for i in range(num):
  a = int(input())
  set.append(a)
  
print(len(set(set_)))
Problem p02712 (python)

Fixed submission:
i = int(input())
fizz=[]
for x in range(1, i+1):
  if x % 3 ==0 and x%5==0:
    continue
  elif x % 3==0:
    continue
  elif x%5==0:
    continue 
  else:
    fizz.append(x)
print(sum(fizz))

Buggy submission (verdict: Runtime Error):
i = int(input)
fizz=[]
for x in i:
  if x % 3 ==0 and x%5==0:
    return 
  elif x % 3==0:
    return
  elif x%5==0:
    return 
  else:
    fizz.append(i)
print(sum(fizz))
Problem p02753 (python)

Fixed submission:
a, b, c = input()
s=set([a, b, c])
if len(s)==1:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
data=set([input() for i in range(3)])
if len(data)==1:
  print("NO")
else:
  print("YES")
Problem p02754 (python)

Fixed submission:
x, b, r = map(int, input().split())
k=int(x/(b+r))
print(k*b+min(x%(b+r), b))

Buggy submission (verdict: Runtime Error):
x, b, r = map(int, input().split())
count=0
flag_b=0
flag_r=0
while:
  count+=b if count!=x else break
  flag_b+=1
  count+=r if count!=x else break
  flag_r+=1
  
  
print(x-(flag_r*r))
Problem p02571 (python)

Fixed submission:
s=input()
t=input()
ans=[]
for i in range(len(s)-len(t)+1):
  count=0
  for j in range(len(t)):
    if t[j]==s[i+j]:
      count+=1
  ans.append(count)
print(len(t)-max(ans))

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
ans=[]
for i in range(len(s)-len(t)):
  count=0
  for j in range(len(t)):
    if t[j]==s[i+j]:
      count+=1
  ans.append(count)
print(len(t)-max(ans))
Problem p02689 (python)

Fixed submission:
n,m=map(int,input().split())
h=list(map(int,input().split()))
count=[1]*n
for i in range(m):
  a,b=map(int,input().split())
  if h[a-1]>h[b-1]:
    count[b-1]=0
  elif h[a-1]==h[b-1]:
    count[a-1]=0
    count[b-1]=0
  else:
    count[a-1]=0
print(sum(count))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
h=list(map(int,input().split()))
count=[1]*m
for i in range(m):
  a,b=map(int,input().split())
  if h[a-1]>h[b-1]:
    count[b-1]=0
  elif h[a-1]==h[b-1]:
    count[a-1]=0
    count[b-1]=0
  else:
    count[b-1]=0
print(sum(count))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
A=[]
count = list(range(N))
for i in range(M):
    A.append(sorted(list(map(int,input().split()))))
set(A)
for j in range(M):
     if H[A[j][0]-1]>H[A[j][1]-1]:
                             if A[j][1]-1 in count:
                                 count.remove(A[j][1]-1)
                             else:
                                 pass
     elif H[A[j][0]-1]<H[A[j][1]-1]:
                              if A[j][0]-1 in count:
                                 count.remove(A[j][0]-1)
                              else:
                                  pass 
     else:
           if A[j][1]-1 in count:
                     count.remove(A[j][1]-1)
           else:
               pass
           if A[j][0]-1 in count:
                     count.remove(A[j][0]-1)
           else:
               pass
print(len(count))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
A=[]
count = list(range(N))
for i in range(M):
    A.append(sorted(list(map(int,input().split()))))
set(A)
for j in range(M):
     if H[A[j][0]-1]>H[A[j][1]-1]:
                             if A[j][1]-1 in count:
                                 count.remove(A[j][1]-1)
                             else:
                                 pass
     elif H[A[j][0]-1]<H[A[j][1]-1]:
                              if A[j][0]-1 in count:
                                 count.remove(A[j][0]-1)
                              else:
                                  pass 
     else:
           if A[j][1]-1 in count:
                     count.remove(A[j][1]-1)
           else:
               pass
           if A[j][0]-1 in count:
                     count.remove(A[j][0]-1)
           else:
               pass
print(len(count))
Problem p02693 (python)

Fixed submission:
K =int(input())
A,B=map(int,input().split())
list =[]
for i in range(A,B+1):
    list.append(i%K==0)
print("OK" if True in list else "NG")

Buggy submission (verdict: Runtime Error):
a,b,N = map(int,input().split())
list =[]
for x in range(N-10000,N+10000):
    list.append(int(a*x/b)-a*int(x/b))
print(max(list))
Problem p02701 (python)

Fixed submission:
N = int(input())
List = list(input() for i in range(N))
print(len(set(List)))

Buggy submission (verdict: Runtime Error):
N=int(inout())
S=list(input() for i in range(N))
print(len(set(S)))

Buggy submission (verdict: Runtime Error):
N=int(inout())
S=[input() for i in range(N)]
print(len(set(S)))

Buggy submission (verdict: Runtime Error):
N = input()
List = list(input() for i in range(N))
print(len(set(List)))
Problem p02707 (python)

Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")

Buggy submission (verdict: Runtime Error):
N =input()
A =list(map(int,input().split()))
l =[0*N]
for i in A:
  A[i]+=1
print(l, sep ="\n")

Buggy submission (verdict: Runtime Error):
N =input()
A =list(map(input().split()))
l =[0*N]
for i in A:
  A[i]+=1
print(l, sep ="\n")

Buggy submission (verdict: Runtime Error):
N =input()
A =list(map(input().split()))
l =[0*N]
for i in range A:
  A[i]+=1
print(l, sep ="\n")

Buggy submission (verdict: Runtime Error):
N =input()
A =list(map(input().split()))
l =[0*N]
for i in range A:
  A[i]+=1
print(l, sep ="\n")

Buggy submission (verdict: Runtime Error):
N=int(input())
A =list(map(int,input.split()))
for i in range(N):
  print(A.count(i+1))
Problem p02723 (python)

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

Buggy submission (verdict: Runtime Error):
S=input()
print("Yes" if S[2] == S[3] and S[4]=S[5] else "No")
Problem p02725 (python)

Fixed submission:
K,N=map(int,input().split())
L=list(map(int,input().split()))
A=[]
for i in range(N-1):
  A.append(L[i+1]-L[i])
A.append(K-L[N-1]+L[0])
print(K-max(A))

Buggy submission (verdict: Runtime Error):
K,N=map(int,input().split())
L=list(map(int,input().split()))
A=[]
for i in range(N-1):
  A.append(L[i+1]-L[i])
L.append(K-L[L-1]+L[0])
print(K-max(L))

Buggy submission (verdict: Runtime Error):
K,N=map(int,input().split())
L=list(map(int,input.split()))
A=[]
for i in range(N-1):
  A.append(L[i+1]-L[i])
L.append(K-L[L-1]+L[0])
print(K-max(L))
Problem p02726 (python)

Fixed submission:
import collections
N,x,y=map(int,input().split())
lit=[]
for i in range(1,N+1):
  for j in range(i+1,N+1):
     lit.append(min(abs(i-j),abs(x-j)+abs(y-i)+1,abs(y-j)+abs(x-i)+1))
a=collections.Counter(lit)
for i in range(1,N):
  print(a[i])

Buggy submission (verdict: Runtime Error):
import collections
n,x,y=map(int,input().split())
lit=[]
for i in range(1,N+1):
  for j in range(i+1,N+1):
     lit.append(min(abs(i-j),abs(x-j)+abs(y-i)+1,abs(y-j)+abs(x-i)+1))
a=lit.collections.Counter
for i in range(1,N):
  print(a[i])
Problem p02879 (python)

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

Buggy submission (verdict: Runtime Error):
import math
a,b,x=map(int,input().split())
if a**2*b>=2*x:
  ans=math.degrees(math.atan(2*x/(a*b**2)))
  print(90-ans)
else:
  ans=math.degrees(math.atan(a**2/(2*a*b-2*x/a)))
  print(90-ans)
Problem p03041 (python)

Fixed submission:
N,K=map(int,input().split())
S=input()
print(S[:K-1]+S[K-1].lower()+S[K:N+1])

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
S=input()
if S[K-1]=A:
  S[K-1]=a
if S[K-1]=B:
  S[K-1]=b
else:
  S[K-1]=c
print(S)
Problem p03042 (python)

Fixed submission:
S=input()
a=int(S[:2])
b=int(S[2:])
if 1<=a<=12 and 1<=b<=12:
  print("AMBIGUOUS")
elif 1<=a<=12:
  print("MMYY")
elif 1<=b<=12:
  print("YYMM")
else:
  print("NA")

Buggy submission (verdict: Runtime Error):
S=input()
a=int(S[:2])
b=int(S[2:])
if 1<=a<=12 and 1<=b<=12:
  print("AMBIGUOUS")
elif 1<=a<=12:
  print("MMYY")
elif 1<=B<=12:
  print("YYMM")
else:
  print("NA")