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

Fixed submission:
n = int(input())
d = len(str(n))
a = [9, 0, 900, 0, 9000]
c = 0
for i in range(1, d):
  if i % 2 == 1:
  	c += 9 * (10**(i-1))
  
if d == 1:
  c += n
else:
  c += n - int('9'*(d-1)) if d % 2 == 1 else 0

print(c)

Buggy submission (verdict: Runtime Error):
n = int(input())
d = len(str(n))
c = 0
for i in range(1, d):
  if i % 2 == 1:
  	c += 9 * (10**(i-1))
  
c += n - int('9'*(d-1)) if d % 2 == 1 else 0

print(c)
Problem p03000 (python)

Fixed submission:
n, x = map(int, input().split())
ls = list(map(int, input().split()))

bounce = [0] + [ sum(ls[:i]) for i in range(1, len(ls)+1) ]

for i, v in enumerate(bounce):
  if v > x:
    print(i)
    break
else:
  print(len(bounce))

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
ls = list(map(int, input().split()))

bounce = [0]

while bounce[-1] < x:
  bounce.append(bounce[len(bounce)-1] + ls[len(bounce)-1])

print(len(bounce))
Problem p03030 (python)

Fixed submission:
N = int(input())
rs = []
for i in range(N):
  s, p = input().split()
  rs.append((i+1, s, int(p)))

rs.sort(key=lambda x:(x[1], -x[2]))
for r in rs:
  print(r[0])

Buggy submission (verdict: Runtime Error):
N = int(input())
rs = []
for _ in range(N):
  s, p = map(int, input().split())
  rs.append((i+1, s, p))

rs.sort(key=lambda x:(x[1], -x[2]))
for r in rs:
  print(r[0])
Problem p03069 (python)

Fixed submission:
from functools import reduce
l = int(input())
src = list(map(lambda x: 1 if x=="." else 0, input()))
left_black = 0
right_white = sum(src)
ans = right_white
for i in range(l):
  if src[i]==0:
    left_black+=1
  else:
    right_white-=1
  ans = min(ans, left_black + right_white)
  if ans==0:
    break
print(ans)

Buggy submission (verdict: Runtime Error):
from functools import reduce
l = int(input())
src = list(map(lambda x: 1 if x=="." else 0, input()))
lb = 0
rw = sum(src)
a = rw
for i in range(l):
  if src[i]==0:
    lb+=1
  else:
    rw-=1
  a = min(ans, lb + rw)
  if a==0:
    break
print(a)

Buggy submission (verdict: Runtime Error):
from functools import reduce
l = int(input())
src = list(map(lambda x: 1 if x=="." else 0, input()))
lb = 0
rw = sum(src)
a = rw
for i in range(l):
  if src[i]==0:
    lb+=1
  else:
    rw-=1
  a = min(ans, left_black + right_white)
  if ans==0:
    break
print(ans)
Problem p03101 (python)

Fixed submission:
H, W = map(int, input().split(" "))
h, w = map(int, input().split(" "))
print((H - h)*(W - w))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split(" "))
stores = dict()
p = 10000000000

for i in range(N):
    if 1 in stores and stores[1] >= M:
      break
    Ai, Bi = map(int, input().split(" "))
    if Ai in stores:
        stores[Ai] += Bi
    else:
        stores[Ai] = Bi
    p = min(p, Ai)


price = 0
while True:
    if p in stores:
        if M <= stores[p]:
            price += p * M
            break
        else:
            price += p * stores[p]
            M -= stores[p]
    p += 1
print(price)
Problem p03103 (python)

Fixed submission:
N, M = map(int, input().split(" "))
stores = []

for i in range(N):
    Ai, Bi = map(int, input().split(" "))
    stores.append((Ai, Bi))    

price = 0
for a, b in sorted(stores, key=lambda x: x[0]):
    if M <= b:
        price += a * M
        break
    else:
        price += a * b
        M -= b
print(price)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split(" "))
stores = dict()
p = 10000000000

for i in range(N):
    if p==1 and stores[p] >= M:
      break
    Ai, Bi = map(int, input().split(" "))
    if Ai in stores:
        stores[Ai] += Bi
    else:
        stores[Ai] = Bi
    p = min(p, Ai)


price = 0
for i, c in sorted(stores, key=lambda x: x[0]):
    if M <= c:
        price += i * M
        break
    else:
        price += i * c
        M -= c

print(price)
Problem p03106 (python)

Fixed submission:
def ls_devider(num):
    fs = set()
    fs.add(1)

    if num > 1:
        for i in range(2, num+1):
            if num % i == 0:
                fs.add(i)

    return fs


a, b, k = map(int, input().split(' '))
a_dvs = ls_devider(a)
b_dvs = ls_devider(b)

print(sorted(a_dvs&b_dvs, reverse=True)[k-1])

Buggy submission (verdict: Runtime Error):
def ls_devider(num):
    fs = set()
    fs.add(1)

    if num > 1:
        for i in range(2, num):
            if num % i == 0:
                fs.add(i)

    return fs


a, b, k = map(int, input().split(' '))
a_dvs = ls_devider(a)
b_dvs = ls_devider(b)

print(sorted(a_dvs&b_dvs)[k-1])
Problem p03138 (python)

Fixed submission:
n, k = map(int, input().split(" "))
b_k = list(map(int, format(k+1, "b").zfill(40)[::-1]))
target = [ 0 for _ in range(40) ]
numbers = list(map(int, input().split(" ")))
for i in numbers:
  for idx, v in enumerate(format(i, "b")[::-1]):
    if v=="1":
      target[idx] += 1
best = [ 1 if n > 2*target[i] else 0 for i in range(40) ]

maxr = sum(numbers)
for i in range(len(b_k)):
  if b_k[i] == 1:
    maxr = max(maxr, sum((2**idx)*(t if r==0 else n-t) for idx, (t, r) in enumerate(zip(target, best[:i] + [0] + b_k[i+1:]))))
print(maxr)

Buggy submission (verdict: Runtime Error):
def binary_decomp(num):
  return _binary_decomp(num, list())

def _binary_decomp(num, p):
  if num == 0:
    return p
  k = 0
  while 2**k <= num:
    k+=1
  p.append(k-1)
  return _binary_decomp(num-2**(k-1), p)

def bin_to_num(ls):
  r = 0
  for idx, v in enumerate(ls):
    if v==1:
      r += 2**idx

  return r


n, k = map(int, input().split(" "))
bin_k = binary_decomp(k)
o = max(bin_k) + 1
bin_as = [0 for _ in range(o)]
for v in map(int, input().split(" ")):
  for i in binary_decomp(v):
    bin_as[i] += 1
pred = [1 if n > 2*bin_as[i] else 0 for i in range(o)]
change=0
while bin_to_num(pred) > k:
  pred[change] = 0
  change += 1

ans = 0
for idx, (m, r) in enumerate(zip(bin_as, pred)):
  ans += (m if r==0 else n-m)*(2**idx)

print(ans)
Problem p03206 (python)

Fixed submission:
print("Christmas" + " Eve"*(25-int(input())))

Buggy submission (verdict: Runtime Error):
def bread_cnt(lev):
    return 2 ** (lev + 1) - 2


def patty_cnt(lev):
    return 2 ** (lev + 1) - 1


def burger_cnt(lev):
    return 2 ** (lev + 2) - 3


def solve(n, x):
    return _solve(n, x, 0)


def _solve(n, x, p):
    total_s = burger_cnt(n)
    mid = (total_s + 1) // 2

    if x == 1:
        return p + (1 if n == 0 else 0)
    elif 1 < x <= mid:
        reach_mid = 1 if x == mid else 0
        return _solve(n - 1, x - 1 - reach_mid, p + reach_mid)
    elif mid < x < total_s:
        return _solve(n - 1, x - 2 - burger_cnt(n - 1), p + 1 + patty_cnt(n - 1))
    elif x == total_s:
        return p + patty_cnt(n)


n, x = map(int, input().split(' '))
print(solve(n, x))
Problem p03213 (python)

Fixed submission:
from math import sqrt, ceil, factorial
def is_prime(num):
  for i in range(2, ceil(sqrt(num))+1):
    if num%i==0:
      return False
  return True

def permcnt(n, r):
  return factorial(n) // factorial(n-r)

def combcnt(n, r):
  return factorial(n) // (factorial(n-r)*factorial(r))

n = int(input())
pls = [2]
i=3
while i<=n:
  if is_prime(i):
    pls.append(i)
  i+=1

def factoring(num):
  return _factoring(num, dict())
  
def _factoring(num, p):
  for i in pls:
    if num % i == 0:
      if i in p:
        p[i] += 1
      else:
        p[i] = 1
      return _factoring(num//i, p)
  return p

factors = dict()
for i in range(1,n+1):
  for k, v in factoring(i).items():
    if k in factors:
      factors[k] += v
    else:
      factors[k] = v

cnt = 0

# 七五数がx^74の形となるケース
cnt += len(list(filter(lambda x:x[1]>=74, factors.items())))

# 七五数がx^2*y^24の形となるケース
xs = {k for k,v in factors.items() if 2<=v and v<24}
ys = {k for k,v in factors.items() if v>=24}
cnt += len(xs)*len(ys)
cnt += permcnt(len(ys), 2) if len(ys)>=2 else 0

# 七五数がx^4*y^14の形となるケース
xs = {k for k,v in factors.items() if 4<=v and v<14}
ys = {k for k,v in factors.items() if v>=14}
cnt += len(xs)*len(ys)
cnt += permcnt(len(ys), 2) if len(ys)>=2 else 0

# 七五数がx^2*y^5*z^5の形となるケース
xs = {k for k,v in factors.items() if 2<=v and v<4}
ys = {k for k,v in factors.items() if v>=4}
cnt += len(xs)*combcnt(len(ys),2) if len(ys)>=2 else 0
cnt += 3*combcnt(len(ys), 3) if len(ys)>=3 else 0

print(cnt)

Buggy submission (verdict: Runtime Error):
from math import sqrt, ceil, factorial
def is_prime(num):
  for i in range(2, ceil(sqrt(num))+1):
    if num%i==0:
      return False
  return True

def permcnt(n, r):
  return factorial(n) // factorial(n-r)

def combcnt(n, r):
  return factorial(n) // (factorial(n-r)*factorial(r))

n = int(input())
pls = [2]
i=3
while i<=n:
  if is_prime(i):
    pls.append(i)
  i+=1

def factoring(num):
  return _factoring(num, dict())
  
def _factoring(num, p):
  for i in pls:
    if num % i == 0:
      if i in p:
        p[i] += 1
      else:
        p[i] = 1
      return _factoring(num//i, p)
  return p

factors = dict()
for i in range(1,n+1):
  for k, v in factoring(i).items():
    if k in factors:
      factors[k] += v
    else:
      factors[k] = v

      
maxe = max(factors.values())
cnt = 0

# 七五数がx^74の形となるケース
cnt += len(list(filter(lambda x:x[1]>=74, factors.items())))

# 七五数がx^2*y^24の形となるケース
xs = {k for k,v in factors.items() if 2<=v and v<24}
ys = {k for k,v in factors.items() if v>=24}
cnt += len(xs)*len(ys)
cnt += permcnt(len(ys), 2) if len(ys)>=2 else 0

# 七五数がx^4*y^14の形となるケース
xs = {k for k,v in factors.items() if 4<=v and v<14}
ys = {k for k,v in factors.items() if v>=14}
cnt += len(xs)*len(ys)
cnt += permcnt(len(ys), 2) if len(ys)>=2 else 0

# 七五数がx^2*y^5*z^5の形となるケース
xs = {k for k,v in factors.items() if 2<=v and v<4}
ys = {k for k,v in factors.items() if v>=4}
cnt += len(xs)*combcnt(len(ys),2) if len(ys)>=2 else 0
cnt += 3*combcnt(len(ys.keys()), 3) if len(ys)>=3 else 0

print(cnt)
Problem p03238 (python)

Fixed submission:
if input()=='1':
  print('Hello World')
else:
  print(sum(int(input()) for _ in range(2)))

Buggy submission (verdict: Runtime Error):
if input()=='1':
  print('Hello World')
else:
  print(sum(int(input()) for _ in range(2))
Problem p03239 (python)

Fixed submission:
N, T = map(int, input().split())
r = [tuple(map(int, input().split())) for _ in range(N)]
f = [(c, t) for c, t in r if t <= T]
if len(f)==0:
  print('TLE')
else:
  print(min(f, key=lambda x: x[0])[0])

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
r = [tuple(map(int, input().split())) for _ in range(N)]
f = [(c, t) for c, t in r if t <= T]
print(min(f, key=lambda x: x[0])[0])

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
r = [tuple(map(int, input().split())) for _ in range(n)]
f = [(c, t) for c, t in r if t <= T]
print(min(f, key=lambda x: x[0]))
Problem p02675 (python)

Fixed submission:
N = str(input())
numbers = list(N)
if numbers[-1] == '3':
    print("bon")
elif numbers[-1] in ['2', '4', '5', '7', '9']:
    print("hon")
else:
    print("pon")

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

if len(S) <= K:
    print(S)
else:
    print(S[0 : K] + '...')
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('Rainy')
else S == ('Rainy')
     print('Sunny')
Problem p02923 (python)

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

cnt=0
l=[]

if N==1:
	cnt=0
	l.append(cnt)
else:
	for i in reversed(range(1,N)):
		if H[i]<=H[i-1]:
			cnt+=1
			if i==1:
				l.append(cnt)
		else:
			l.append(cnt)
			cnt=0

print(max(l))

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

cnt=0
l=[]

if N==1:
	cnt=0
	l.append(cnt)
else:
	for i in reversed(range(1,N)):
		if H[i]<=H[i-1]:
			cnt+=1
		else:
			l.append(cnt)
			cnt=0

print(max(l))

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

cnt=0
l=[]
for i in reversed(range(1,N)):
	if H[i]<=H[i-1]:
		cnt+=1
	else:
		l.append(cnt)
		cnt=0

print(max(l))

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

summary=[]
for i in range(N-1):
    cnt=0
    for j in range(i+1,N):
        if H[i]>=H[j]:
            cnt=cnt+1
            i=i+1
            continue
        else:
            break
    summary.append(cnt)

print(max(summary))
Problem p03000 (python)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))
d = 0
ans = 0
if d <= X:
    ans += 1
for l in L:
    d += l
    if d <= X:
        ans += 1
 
print(ans)

Buggy submission (verdict: Runtime Error):
a = [list(map(int,input().split())) for l in range(2)]
N=a[0][0]
X=a[0][1]
L=a[1]
count=0
D=0
while D<=X and count<=N+1:
    D=D+L[count]
    count=count+1

print(count)
Problem p03037 (python)

Fixed submission:
N,M=map(int,input().split())
L = []
R = []
for i in range(M):
    x1,y1=[int(i) for i in input().split()]
    L.append(x1)
    R.append(y1)

L2=max(L)
R2=min(R)

if L2<=R2:
    print(R2-L2+1)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
L = []
R = []
for i in range(M):
    x1,y1=[int(i) for i in input().split()]
    L.append(x1)
    R.append(y1)

landl=set(range(L[0],R[0]+1))


print(len(list(landl & set(range(L[i],R[i]+1)) for i in range(1,M))[0]))
Problem p03238 (python)

Fixed submission:
N = int(input())
if N == 1:
	print("Hello World")
else:
	A = int(input())
	B = int(input())
	print(A + B)

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
N=a[0]
A=a[1]
B=a[2]

if N==1:
    print('Hello World')
else:
    print(A+B)

Buggy submission (verdict: Runtime Error):
a = [int(input()) for i in range(3)]
N=a[0]
A=a[1]
B=a[2]

if N==1:
    print('Hello World')
else:
    print(A+B)
Problem p03324 (python)

Fixed submission:
DN = list(map(int,input().split()))
D=DN[0]
N=DN[1]

if D==0 and N==100:
    print(101)
elif D==0:
    print(N)
elif D==1 and N==100:
    print(10100)
elif D==1:
    print(100*N)
elif D==2 and N==100:
    print(1010000)
else :
    print(10000*N)

Buggy submission (verdict: Runtime Error):
DN = list(map(int,input().split()))
D=DN[0]
N=DN[1]

if D=0:
    print(N)

if D=1:
    print(100*N)

if D=2:
    print(1000*N)
Problem p03352 (python)

Fixed submission:
x = int(input())
 
m = 1
 
for i in range(1, 32):
    for j in range(2, 10):
        p = pow(i, j)
        if p > x:
            break
        if p > m:
            m = p
 
print(m)

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=[]
for i in range(1,X):
    for j in range(2,X):
        if pow(i,j)>X:
            break
        Y.append(pow(i,j))

print(max(Y))

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=[]
for i in range(1,X):
    for j in range(2,X):
        if pow(i,j)>X:
            break;
        Y.append(pow(i,j))

print(max(Y))

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=[]
for i in range(1,X):
    for j in range(2,X):
        if i**j>X:
            break;
        Y.append(i**j)

print(max(Y))
Problem p03998 (python)

Fixed submission:
a=list(input())
b=list(input())
c=list(input())

turn='a'

while True:
    if turn=='a':
        try:
            turn=a.pop(0)
        except:
            break
    elif turn=='b':
        try:
            turn=b.pop(0)
        except:break
    else:
        try:
            turn=c.pop(0)
        except:
            break
        

print(turn.upper())

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

turn='a'

while len(a)!=0 and len(b)!=0 or len(c)!=0:
    if turn=='a':
        turn=a.pop(0)
    elif turn=='b':
        turn=b.pop(0)
    else:
        turn=c.pop(0)

print(turn.upper())
Problem p02675 (python)

Fixed submission:
N=input()[-1]
if N=="3":
  print("bon")
elif N in {"0","1","6","8"}:
  print("pon")
else:
  print("hon")

Buggy submission (verdict: Runtime Error):
N=input()[-1:]

if N="3":
  print("bon")
elif N in {0,1,6,8}:
  print("pon")
else:
  print("hon")
Problem p03076 (python)

Fixed submission:
import math 

all_list = []

for i in range(5):
  a = int(input())

  all_list.append(a)
  
last_list = [x % 10 for x in all_list if x % 10 > 0]
last_list2 = [x for x in all_list if x % 10 > 0]

if len(last_list) > 0:
  last_x = last_list2[last_list.index(min(last_list))]
  all_list.remove(last_x)
else:
  last_x = 0

sum_list = [math.ceil(x / 10) * 10 for x in all_list]

m = sum(sum_list) + last_x
print(m)

Buggy submission (verdict: Runtime Error):
import math 

all_list = []

for i in range(5):
  a = int(input())

  all_list.append(a)
  
last_list = [x % 10 for x in all_list if x % 10 > 0]
last_list2 = [x for x in all_list if x % 10 > 0]
last_x = last_list2[last_list.index(min(last_list))]

all_list.remove(last_x)

sum_list = [math.ceil(x / 10) * 10 for x in all_list]

m = sum(sum_list) + last_x
print(m)
Problem p03103 (python)

Fixed submission:
import numpy as np

N, M = map(int, input().split())
num_dict = dict()
A_list = []
B_list = []

for n in range(N):
  A, B = map(int, input().split())
  num_dict.setdefault(A, 0)
  num_dict[A] += B
  A_list.append(A)

A_list = list(set(A_list))
A_list.sort()
b_accum = 0
all_pay = 0

for a in A_list:
  if M <= b_accum:
    break

  if b_accum + num_dict[a] <= M:
    all_pay += num_dict[a] * a
    b_accum += num_dict[a]    
  
  else:
    all_pay += (M - b_accum) * a 
    b_accum += num_dict[a]
    break
    
print(all_pay)

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

N, M = map(int, input().split())
num_dict = dict()
A_list = []

for n in range(N):
  A, B = map(int, input().split())
  num_dict[A] = B
  A_list.append(A)

A_list.sort()
b_accum = 0
all_pay = 0

for a in A_list:
  if M <= b_accum:
    break

  if b_accum + num_dict[a] <= M:
    all_pay += num_dict[a] * a
    b_accum += num_dict[a]
    
    if M == b_accum:
		
  
  else:
    all_pay += (M - b_accum) * a 
    b_accum += num_dict[a]
    
print(all_pay)
Problem p03110 (python)

Fixed submission:
N = int(input())
all_yen = 0
for n in range(N):
    x , u = input().split()
    x = float(x)
    if u == 'BTC':
        x *= 380000.0
        
    all_yen += x

print(all_yen)

Buggy submission (verdict: Runtime Error):
N = int(input())
all_yen = 0
for n in range(N):
    x , u = input().split()
    if u  == 'BTC':
        x *= 380000.0

    all_yen += x
Problem p03415 (python)

Fixed submission:
row1 = input()[0]
row2 = input()[1]
row3 = input()[2]

print(row1 + row2 + row3)

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

for b in range(K+1, N+1):
    u = ((N - b)//b) + 1
    v =  (N - K)//b

    cnt += (b-K)*u + (v-u+1)*(-b*(u+v)+2*N-2*K+2)*(1/2)

print(cnt)
Problem p03418 (python)

Fixed submission:
N, K = map(int, input().split())
cnt = 0

if K > 0:
    for b in range(K+1, N+1):
        u = ((N - b)//b) + 1
        v =  (N - K)//b

        cnt += (b-K)*u + (v-u+1)*(-b*(u+v)+2*N-2*K+2)/2
else:
    for b in range(K+1, N+1):
        u = ((N - b)//b) + 1
        v =  (N - K)//b

        cnt += (b-K)*u + (v-u+1)*(-b*(u+v)+2*N-2*K+2)/2 - 1

print(int(cnt))

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

cnt = 0


for b in range(K+1, N+1):
    if N % b  == 0:
        cnt += (b-K)*(N//b) + max((N - (N //b) * b) - K  , 0)
    else
        cnt += (b - K) * (N // b) + max((N - (N // b) * b) - K+1, 0)
print(cnt)
Problem p03424 (python)

Fixed submission:
N = int(input())

ball_list = map(str, input().split())
type_num = len(list(set(ball_list)))

if type_num == 3:
    print('Three')
else:
    print('Four')

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

ball_list = []

for i in range(N):
    ball_list.append(int(input()))

print(len(list(set(ball_list)))
Problem p02772 (python)

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

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            exit()

print('APPROVED')

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

for i in range(n):
    if a[i] % 6 == or a[i] % 10:
        print('APPROVED')
        break

print('DENIED')
Problem p02801 (python)

Fixed submission:
s = input()

print(chr(ord(s) + 1))

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

print(chr(ord(s) + 1)

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

print(char(ord(s) + 1)

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

print(char(ord(s) + 1))

Buggy submission (verdict: Runtime Error):
a = input()
ans = char(ord(a) + 1)

print(ans)
Problem p02830 (python)

Fixed submission:
n = int(input())

s, t =input().split()

ans = ''

for i in range(n):
    ans += s[i]
    ans += t[i]

print(ans)

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

s, t = map(input().split())

ans = ''

for i in range(n):
    ans += s[i]
    ans += 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 h:
  if i >= k:
    ans += 1
print(ans)

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

ans = 0

for i in h:
  if i >= k:
    ans += 1
print(ans)
Problem p03493 (python)

Fixed submission:
s = list(input())

ans = 0

for i in s:
    if i == '1':
        ans += 1
    
    if i == '0':
        continue

print(ans)

Buggy submission (verdict: Runtime Error):
n = map(int, input().split())
ans = n.count('1')

print(ans)
Problem p02675 (python)

Fixed submission:
def resolve():
    n = list(input())
    target = int(n[-1])
    if target in [2,4,5,7,9]:
        print('hon')
    elif target in [0,1,6,8]:
        print('pon')
    else:
        print('bon')
resolve()

Buggy submission (verdict: Runtime Error):
import math
a,b,h,m = map(int, input().split())
ans = math.sqrt(float(a)**2+float(b)**2-2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi*2))
print(ans)
Problem p02677 (python)

Fixed submission:
import math
a,b,h,m = map(int, input().split())
ans = math.sqrt(float(a)**2+float(b)**2-2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi*2))
print(ans)

Buggy submission (verdict: Runtime Error):
import math
a = int(input())
b = int(input())
h = int(input())
m = int(input())
ans = math.sqrt(float(a)^2+float(b)^2+2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi))
print(ans)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())
m = int(input())
ans = math.sqrt(float(a)^2+float(b)^2+2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi))
print(ans)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())
m = int(input())
ans = math.sqrt(a^2+b^2+2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi))
print(ans)
Problem p02898 (python)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
c=0
for i in l:
  if i>=k:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
c=0
for i in l:
  if l>=k:
    c+=1
print c
Problem p02675 (python)

Fixed submission:
n = input()
n_1 = int(n[-1])
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if n_1 in hon:
    print('hon')
elif n_1 in pon:
    print('pon')
else:
    print('bon')

Buggy submission (verdict: Runtime Error):
n = input()
n_1 = int(n[-1])
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if n_1 in hon:
  print('hon')
  elif n_1 in pon:
    print('pon')
  else:
    print('bon')
Problem p02687 (python)

Fixed submission:
S = input()
if S == "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
if S == "ABC":
  print("ARC")
 else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S = input()
if S == "ABC":
  print("ARC")
 else:
  print("ABC")
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())

print(int((a+b)*h / 2))

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

Fixed submission:
a = int(input())
sum = 0

for i in range(a+1):
  sum += i
  
print(sum)

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

for i in range(a + 1):
  sum += i
 
print(sum)