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

Fixed submission:
import sys
sys.setrecursionlimit(10**7)

from functools import lru_cache

@lru_cache(None)
def dfs(p, remain):

    n = len(arr)

    if remain == 0 or p >= n:
        return 0

    if remain == 1:
        return max(arr[p:])
        
    len_remain = n - (p + 1)

    t = -float('inf')
    if (remain - 1) * 2 + 1 <= len_remain:
        t = dfs(p + 1, remain)

    t2 = arr[p] + dfs(p + 2, remain - 1)

    return max(t, t2)

    


n = int(input())

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

ans = dfs(0, n // 2)

print (ans)

Buggy submission (verdict: Runtime Error):
from functools import lru_cache

@lru_cache(None)
def dfs(p, remain):

    n = len(arr)

    if remain == 0 or p >= n:
        return 0

    if remain == 1:
        return max(arr[p:])
        
    len_remain = n - (p + 1)

    t = -float('inf')
    if (remain - 1) * 2 + 1 <= len_remain:
        t = dfs(p + 1, remain)

    t2 = arr[p] + dfs(p + 2, remain - 1)

    return max(t, t2)

    


n = int(input())

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

ans = dfs(0, n // 2)

print (ans)
Problem p02639 (python)

Fixed submission:
def main():
    x = list(map(int,input().split()))
    ans = x.index(0)

    print(ans+1)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import itertools

def main():
    n = int(input())
    a = list(map(int,input().split()))
    b = set(a)
    ansAry = [0] * 10000000

    num = len(a) - len(b)

    count = 0

    a.sort()

    x =  list(itertools.combinations(a,2))
    # print (x)

    
    for i in range(len(x) // 3 * 2):
        if x[i][1] % x[i][0] == 0 and ansAry[x[i][1]] == 0 :
            count += 1
            ansAry[x[i][1]] = 1

    print(n - count - num)

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

Fixed submission:
N=int(input())
def sq(n):
    c=0
    A=[0 for j in range(n+1)]
    for i in range(n//2):
        p=(i+1)**2
        if p>n:
            for j in range(i**2,n+1):
                A[j]=i
            break
        else:
            for j in range(i**2,p):
                A[j]=i
    return A
A=sq(N)
a=A[N]
L=[0 for j in range(N+1)]
for x in range(1,a+1):
    for y in range(1,a+1):
        for z in range(1,a+1):
            p=x**2+y**2+z**2+x*y+y*z+z*x
            if p<=N:
                L[p]=L[p]+1
            else:
                break
for i in range(1,N+1):
    print(L[i])

Buggy submission (verdict: Runtime Error):
N=int(input())
def sq(n):
    c=0
    A=[0 for j in range(n+1)]
    for i in range(n//2):
        p=(i+1)**2
        if p>n:
            for j in range(i**2,n+1):
                A[j]=i
            break
        else:
            for j in range(i**2,p):
                A[j]=i
    return A
A=sq(N)
L=[0 for j in range(N+1)]
for x in range(1,a+1):
    for y in range(1,a+1):
        for z in range(a+1):
            p=x**2+y**2+z**2+x*y+y*z+z*x
            if p<=N:
                L[p]=L[p]+1
            else:
                break
for l in L:
    print(l)

Buggy submission (verdict: Runtime Error):
N=int(input())
def sq(n):
    c=0
    A=[0 for j in range(n**2)]
    for i in range(n//2):
        for j in range(i**2,(i+1)**2):
            A[j]=i
    return A
A=sq(N)[0:N+1]
for n in range(1,N+1):
    c=0
    for x in range(1,A[n]):
        for y in range(1,A[n-x**2]):
            for z in range(1,A[n-x**2-y**2]):
                if n==x**2+y**2+z**2+x*y+y*z+z*x:
                    c=c+1
    print(c)

Buggy submission (verdict: Runtime Error):
N=int(input())
def sq(n):
    c=0
    A=[0 for j in range(n**2)]
    for i in range(n//2):
        for j in range(i**2,(i+1)**2):
            A[j]=i
    return A
A=sq(N)[0:N+1]
print(A)
for n in range(1,N+1):
    c=0
    for x in range(1,A[n]):
        for y in range(1,A[n-x**2]):
            for z in range(1,A[n-x**2-y**2]):
                if n==x**2+y**2+z**2+x*y+y*z+z*x:
                    c=c+1
    print(c)
Problem p02621 (python)

Fixed submission:
a=int(input())
print(a+a**2+a**3)

Buggy submission (verdict: Runtime Error):
a=input()
print(a+a^2+a^3)
Problem p02657 (python)

Fixed submission:
print(eval(input().replace(" ","*")))

Buggy submission (verdict: Runtime Error):
print(eval(input().replase(" ","*")))
Problem p02658 (python)

Fixed submission:
n=input()
A=list(map(int,input().split()))
ans=1
if A.count(0)==0:
  for i in A:
    ans*=i
    if ans>10**18:
      ans=-1
      break
else:
  ans=0
print(ans)

Buggy submission (verdict: Runtime Error):
from decimal import *
import numpy as np
n=input()
ans=list(map(Decimal,input().split()))
ans = np.prod(ans)

if ans>10**18:
  print(-1)
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
from decimal import *
import numpy as np
n=input()
ans=list(map(Decimal,input().split()))
ans = np.prod(ans)

if ans>10**18:
  print(-1)
else:
  print(int(ans))

Buggy submission (verdict: Runtime Error):
from decimal import *
n=input()
ans=eval("Decimal("+input().replace(" ",")*Decimal(")+")")

if ans>10**18:
  print(-1)
else:
  print(int(ans))

Buggy submission (verdict: Runtime Error):
import numpy as np

n=input()
a=list(map(int,input().split()))
a=np.array(a,dtype="float64")
ans=np.prod(a)

if ans>10**18:
  print(-1)
else:
  print(int(ans))

Buggy submission (verdict: Runtime Error):
n=input()
ans=eval(input().replace(" ","*"))
if ans>10**18:
  print(-1)
else:
  print(ans)
Problem p02705 (python)

Fixed submission:
import math
R=int(input())

print(R*math.tau)

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

print(3.14*math.tau)
Problem p02714 (python)

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

ans = S.count("R")*S.count("G")*S.count("B")

tmp=0

for i in range(N):
  for j in range(i,N):
    if j-i+j < N:
      if S[i]!=S[j] and S[j]!=S[j-i+j] and S[i]!=S[j-i+j]:
        tmp += 1

ans = ans - tmp
print(ans)

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

ans = S.count("R")*S.count("G")*S.count("B")

tmp=0

for i in range(N):
  for j in range(i,N):
    if j-i+j < N:
      if S[i]==S[j] and S[j]==S[j-i+j] and S[i]==S[j-i+j]
        tmp += 1

ans = ans - tmp
print(ans)
Problem p02741 (python)

Fixed submission:
k = int(input())

a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(a[k-1])

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

a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(a[K-1])
Problem p02747 (python)

Fixed submission:
S = input()

ans = "No"
for i in range(1,6):
    if S == "hi"*i:
        ans="Yes"
print(ans)

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

ans = "No"
for i in range(1:6):
    if S == "hi"*i:
        ans="Yes"
print(ans)
Problem p02755 (python)

Fixed submission:
import math

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

ans=-1
for i in range(1,1001):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        ans=i
        break

print(ans)

Buggy submission (verdict: Runtime Error):
import math

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

ans=-1
for i in range(1,B*10+1)
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        ans=i
        break

print(ans)
Problem p02756 (python)

Fixed submission:
S=input()
Q=int(input())
query=[]
for _ in range(Q):
    query.append(input().split())

flag = True
t=""
u=""

for i in query:
    if i[0]=="1":
        u,t=t,u
        flag = not flag
#        S=S[::-1]
    else:
        if i[1]=="1":
            t+=i[2]
        else:
            u+=i[2]
if flag:
    print(t[::-1]+S+u)
else:
    print(t[::-1]+S[::-1]+u)

Buggy submission (verdict: Runtime Error):
S=input()
Q=int(input())
query=[]
for _ in range(Q):
    query.append(input().split())

flag = True

for i in query:
    if i[0]=="1":
        flag = not flag
#        S=S[::-1]
    else:
        if flag:
            if i[1]=="1":
                S=i[2]+S
            else:
                S=S+i[2]
        else:
            if i[1]=="1":
                S=S+i[2][::-1]
            else:
                S=i[2][::-1]+S
if flag:
    print(S)
else:
    print(S[::-1]
Problem p02772 (python)

Fixed submission:
_ = input()
a=map(int,input().split())
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")

Buggy submission (verdict: Runtime Error):
_ = input()
a=map(int,*input().split())
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")

Buggy submission (verdict: Runtime Error):
_ = input()
*a,=input().split()
flag = True
for i in a:
  if i%2 == 0:
    if i%3 != 0:
      if i%5 != 0:
        flag = False
        break
if flag:
  print("APPROVED")
else:
  print("DENIED")
Problem p03029 (python)

Fixed submission:
a,p=map(int,input().split())
print((a*3+p)//2)

Buggy submission (verdict: Runtime Error):
print(eval(input().replace(" ","//")))
Problem p03068 (python)

Fixed submission:
N=int(input())
S=list(input())
K=int(input())

for i in range(len(S)):
  if S[i]!=S[K-1]:
    S[i]="*"
print(*S,sep="")

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

for i in range(len(S)):
  if S[i]!=S[K-1]:
    S[i]="*"
print(S)
Problem p03076 (python)

Fixed submission:
import math
l=[]
for i in range(5):
  l=l+[int(input())]

li=[i%10 for i in l]
lil = [i for i in li if i!=0]
if lil:
  minimum=min([i for i in li if i!=0])
else:
  minimum=0
ans=l.pop(li.index(minimum))
for i in l:
  ans+=math.ceil(i/10)*10

print(ans)

Buggy submission (verdict: Runtime Error):
import math
l=[]
for i in range(5):
  l=l+[int(input())]

temp=[10-i for i in l if i%10!=0]

print(sum(l)-max(li))

Buggy submission (verdict: Runtime Error):
import math
l=[]
for i in range(5):
  l=l+[int(input())]

li=[i%10 for i in l]
minimum=min([i for i in li if i!=0])
ans=l.pop(li.index(minimum))
for i in l:
  ans+=math.ceil(i/10)*10

print(ans)
Problem p03102 (python)

Fixed submission:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
A=[]
for i in range(N):
  A.append([int(i) for i in input().split()])
ans=0
for a in A:
  asum=0
  for i in range(M):
    asum += a[i]*B[i]
  asum+=C
  if asum > 0:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
A=[]
for i in range(N):
  A.append([int(i) in i for input().split()])
ans=0
for a in A:
  asum=0
  for i in range(M):
    asum+=A[i]+B[i]
  asum+=C
  if asum > 0:
    ans+=1
print(ans)
Problem p03126 (python)

Fixed submission:
N,M = map(int,input().split())
K=[]
ans=0
for _ in range(N):
  K+=input().split()[1:]
S=set(K)
for s in S:
  if K.count(s)==N:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
K=[]
ans=0
for _ in range(N):
  K+=[input().split()]
S=set(K)
for s in S:
  if K.count(s)==N:
    ans+=1
print(ans)
Problem p03408 (python)

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
l=list(set(s))
List=[s.count(l[i])-t.count(l[i]) for i in range(len(l))]
print(max(0,max(List)))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[int(input()) for _ in range(N)]
M=int(input())
t=[int(input()) for _ in range(M)]
l=set(s)
List=[s.count(l[i])-t.count(l[i]) for i in range(len(l))]
print(max(0,max(List)))
Problem p03471 (python)

Fixed submission:
N,Yen=map(int,input().split())

def solver(n,yen):
  for x in range(n+1):
    for y in range(n-x+1):
      z=n-x-y
      if x*10000+y*5000+z*1000 == yen:
        return x,y,z
  return -1,-1,-1
print(*solver(N,Yen))

Buggy submission (verdict: Runtime Error):
N,Yen=map(int,input())

def solver(n,yen):
  for x in range(n+1):
    for y in range(n-x+1):
      z=n-x-y
      if x*10000+y*5000+z*1000 == yen:
        return x,y,z
  return -1,-1,-1
print(solver(N,Yen))
Problem p03563 (python)

Fixed submission:
print(-1*(int(input())-int(input())*2))

Buggy submission (verdict: Runtime Error):
print(abs(int(input())-int(input())*2)
Problem p04029 (python)

Fixed submission:

N = int(input())
s = 0

for i in range(N):
    s += i+1

print(s)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N
ans = 0

for k in range(N):
    ans = ans + (list[j] - A) ** 2

for i in range(-100,100):
    sum = 0
    sum_new = 0
    for j in range(N):
        sum_new = sum_new + (list[j] - i) ** 2
    if(sum > sum_new):
        ans = sum_new

print(ans)
Problem p04031 (python)

Fixed submission:

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N
ans = 0

for k in range(N):
    ans = ans + (list[k] - A) ** 2

for i in range(-100,100):
    sum_new = 0
    for j in range(N):
        sum_new = sum_new + (list[j] - i) ** 2
    if(ans > sum_new):
        ans = sum_new

print(ans)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N

for k in range(N):
    ans = (list[j] - A) ** 2

for i in range(-100,100):
    sum = 0
    sum_new = 0
    for j in range(N):
        sum = sum + (list[j] - A) ** 2
        sum_new = sum_new + (list[j] - i) ** 2
    if(sum > sum_new):
        ans = sum_new

print(ans)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N

for k in rang(N):
    ans = (list[j] - A) ** 2

for i in range(-100:100):
    for j in range(N):
        sum = 0
        sum_new = 0
        sum = sum + (list[j] - A) ** 2
        sum_new = sum_new + (list[j] - i) ** 2
    if(sum > sum_new):
        ans = sum_new

print(ans)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N

for i in range(-100:100):
    for j in range(N):
        sum = 0
        sum_new = 0
        sum = sum + (list[j] - A) ** 2
        sum_new = sum_new + (list[j] - i) ** 2
        if(sum > sum_new):
            sum = sum_new
print(sum)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N
sum = 0
sum_new = 0

for i in range(-100:100):
    for j in range(N):
        sum = sum + (list[j] - A) ** 2
        sum_new = sum_new + (list[j] - i) ** 2
        if(sum > sum_new):
            sum = sum_new
print(sum)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N
sum = 0
sum_new = 0

for i in range(-100:100):
    for j in range(N):
        sum = sum + (list[j] - A) ** 2
        sum_new = (list[j] - i) ** 2
        if(sum > sum_new):
            sum = sum_new
print(sum)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N



for i in range(-100:100):
    for j in range(N):    
        sum = (list[j] - A) ** 2
        sum_new = (list[j] - i) ** 2
    if(sum > sum_new):
        sum = sum_new
print(sum)

Buggy submission (verdict: Runtime Error):

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N

for i in range(-100:100):
    sum = (list[i] - A) ** 2
    sum_new = (list[i] - i) ** 2
    if(sum > sum_new):
        sum = sum_new
print(sum)
Problem p02582 (python)

Fixed submission:
strings = input()
lists = []
count = 0
for i in strings:
    if i == 'R':
        count += 1
    elif i == 'S':
        lists.append(count)
        count = 0
lists.append(count)
print(max(lists))

Buggy submission (verdict: Runtime Error):
strings = input()
lists = []
count = 0
for i in strings:
    if i == 'R':
        count += 1
    elif i == 'S':
        lists.append(count)
        count = 0
print(max(lists))
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
print(int(eval(input()) * eval(input()))
Problem p02658 (python)

Fixed submission:
n = int(input())
List = list(map(int, input().split()))
res = 1
if 0 in List:
    print(0)
    quit()
for x in List:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)

Buggy submission (verdict: Runtime Error):
N, result = eval(input()), 1
List = list(map(int, input().split()))
if 0 in List:
  print(0)
  quit()
for i in List[N]:
    result *= i
    
print(result if result <= 10**18 else -1)

Buggy submission (verdict: Runtime Error):
N, result = eval(input()), 1
List = list(map(int, input().split()))
for i in List[N]:
    result *= i
    
print(result if result <= 10**18 else -1)
Problem p02706 (python)

Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))
daytofinish = sum(A)
if N-daytofinish < 0:
    print(-1)
else:
    print(N-daytofinish)

Buggy submission (verdict: Runtime Error):
from math import floor

X, val, a = eval(input()), 100, 1

while True :
    val += floor(val * 0.01)
    if val >= X:
        break
    a += 1
print(a)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
daytofinish = sum(A)
print(N-daytofinish)
N, M = map(int, input().split())
A = list(map(int, input().split()))
daytofinish = sum(A)
if N-daytofinish < 0:
    print(-1)
else:
    print(N-daytofinish)
Problem p02717 (python)

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

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
N = abs(N - K)
if N // 10 == 0:
    while N > 100:
        N = N / 100
while N > 0:
    N = (N - K) 
print(abs(N))
Problem p02719 (python)

Fixed submission:
n, k = map(int, input().split())
if n==0 or k==1:
    print(0)
    exit()
elif n<k:
    print(min(n, abs(n-k)))
    exit()
elif n % k == 0:
    print(0)
    exit()
else:
    mx = n%k
print(min(abs(mx-k), mx))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
N = abs(N - K)
while N > 100:
    N = round(N / N[0])
while N > 0:
    N = (N - K) 
print(abs(N))
Problem p02583 (python)

Fixed submission:
from itertools import combinations

n = int(input())
num_list = list(map(int, input().split()))
combination = combinations(num_list, 3)
count = 0
for i in combination:
  if i[0] != i[1] and i[1] != i[2] and i[0] != i[2]:
    if i[0] + i[1] > i[2] and i[1] + i[2] > i[0] and i[0] + i[2] > i[1]:
      count += 1
print(count)

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

n = int(input())
list = list(map(int, input().split()))
combination = combinations(lst, 3)
count = 0
for i in combination:
  if i[0] != i[1] and i[1] != i[2] and i[0] != i[2]:
    if i[0] + i[1] > i[2] and i[1] + i[2] > i[0] and i[0] + i[2] > i[1]:
      count += 1

print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
lst = list(map(int, input().split()))
comb = combinations(lst, 3)
count = 0
for i in comb:
  if i[0] != i[1] and i[1] != i[2] and i[0] != i[2]:
    if i[0] + i[1] > i[2] and i[1] + i[2] > i[0] and i[0] + i[2] > i[1]:
      count += 1
print(count)
Problem p02796 (python)

Fixed submission:
N = int(input())
robots, count = [], 0
for x in range(N):
    X, L = map(int, input().split())
    robots.append((X+L, X-L))
robots.sort()
node = -10**12
for end, start in robots:
    if start >= node:
        node = end
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
input = sys.stdin.readline
 
n = int(input())
robots = []
for i in range(n):
    x, l = [int(item) for item in input().split()]
    robots.append((x+l, x-l))
 
robots.sort()
 
cnt = 0
node = -10**12
for end, start in robots:
    if start >= node:
        node = end
        cnt += 1
print(cnt)
Problem p02582 (python)

Fixed submission:
s = input()

if s=="RRR":
  print(3)
elif s=="RRS" or s=="SRR":
  print(2)
elif s=="SSR" or s=="SRS" or s=="RSS" or s=="RSR":
  print(1)
else:
  print(0)

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

if s=="RRR":
  print(3)
elif s=="RRS" or s=="SRR":
  print(2)
elif s=="SSR" or s=="SRS" or s=="RSS" or s="RSR":
  print(1)
else:
  print(0)
Problem p02641 (python)

Fixed submission:
X, N = map(int, input().split())
p = list(map(int, input().split()))
 
ans = 0
for i in range(1, 102):
    if abs(X - i) < abs(X - ans) and i not in p:
        ans = i
print(ans)

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

#リストを作る
all_l = [i for i in range(0,101)]

#Pの数値を消去
for p in P:
    all_l.remove(p)
    
#全探索
kouho = x
for i in range(200):
    kouho1 = x-i
    kouho2 = x+i
    if kouho1 not in P:
        print(x-i)
        break
    elif kouho2 not in P:
Problem p02705 (python)

Fixed submission:
import math
r = int(input())
ans = 2*r*math.pi
print(ans)

Buggy submission (verdict: Runtime Error):
import math
r = int(input())
ans = 2*r*pimath.pi
print(ans)
Problem p02853 (python)

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

if (x==y==1):
  output=1000000
elif (x*y==2):
  output=500000
elif (x*y==3):
  output=400000
#elif (x*y==4):4*1が存在
elif (x==y==2):
  output=400000
elif (x*y==6):
  output=300000
elif (x*y==9):
  output=200000
  
#x or y  
elif (x==1 or y==1):
  output=300000
elif (x==2 or y==2):
  output=200000
elif (x==3 or y==3):
  output=100000
else:
  output=0
print(output)

Buggy submission (verdict: Runtime Error):
m=int(input())
count=0#求めるトーナメント数
#複数行2数値を受け取る
x = []
y = []
for i in range(m):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x,y)

#最初のエントリーする人を求める
n=str()#空の文字列を作成
for j in range(0, m):#標準入力の数字を連結させてnをつくる
  n += str(x[j])*y[j]#エントリーする人の数
print(n)

#再帰呼び出しする関数
def Selection(entry):  
  l=[]#空のリストを作成。ここに選出人数を入れていく
  for k in range(0, len(n)-1):
  
    int_sum=int(n[k],10)+int(n[k+1],10)#10進数で足し算
    n_replaced=n.replace(n[k:k+2:1],str(int_sum))
    l.append(int(n_replaced,10))#このままだとlの各要素がstr型なのでintに変換
  print(l)
  n=max(l)#選出人数は最大となるものを選ぶ
  
  if n<10:
    print(count)
    exit()
  else:
    count += 1

while True:
  Selection(n)
Problem p02898 (python)

Fixed submission:
N, K = map(int, input().split())
h = list(map(int, input().split()))
 
cnt = 0
for i in range(len(h)):
    if h[i] >= K:
        cnt += 1 
print(cnt)

Buggy submission (verdict: Runtime Error):
n,k = (int(x) for x in input().split())
h = list(map(int, input().split()))

h.sort()
i=0
while h[i]<k:
  i+=1
print(n-i)

Buggy submission (verdict: Runtime Error):
n,k = (int(x) for x in input().split())
h = list(map(int, input().split()))

h.sort()
i=0
while h[i]<k:
　　i+=1

print(n-i)

Buggy submission (verdict: Runtime Error):
n,k = (int(x) for x in input().split())
h = list(map(int, input().split()))

h.sort()
print(h[0])
i=0
while h[i]<k:
  i+=1

print(n-i)

Buggy submission (verdict: Runtime Error):
n,k = (int(x) for x in input().split())
h = list(map(int, input().split()))

h.sort()#身長をソート.デフォルトは昇順なので降順(reverse=True)としておく
i=0
while h[i]<k:
  i+=1
  
print(n-i)
Problem p02921 (python)

Fixed submission:
s=str(input())
t=str(input())
c=0
for i in range(len(s)):
  if s[i]==t[i]:
    c += 1
print(c)

Buggy submission (verdict: Runtime Error):
s=str(input())
n=str(input())
count=0
for i in range(3):
  if s[i]==t[i]:
    count+=1
print(count)
Problem p02922 (python)

Fixed submission:
a, b = map(int, input().split())
c = 0
sum = 1
while True:
    if sum>= b:
        print(c)
        break
    else:
        sum += a-1
        c+= 1

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
m=1#初期値、受け口の数
n=0#初期値、ソケットの個数
 
while True:
  m += a-1
  n += 1
  if m>=b:
    break
print(n)