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

Fixed submission:
import math
a=int(input())
b=math.ceil(a/2)
print(b/a)

Buggy submission (verdict: Runtime Error):
a=int(input())
inport math
b=a/2
c=math.ceil(b)
print(c/a)

Buggy submission (verdict: Runtime Error):
a=int(input())
inport math
b=math.ceil(a/2)
print(b/a)

Buggy submission (verdict: Runtime Error):
a=int(input())
inport math
b=math.ceil(a/2)
print(a/b)
Problem p02897 (python)

Fixed submission:
a=int(input())
b=int(-(-a//2))
print(b/a)

Buggy submission (verdict: Runtime Error):
a=input()
b=a//2
print(b/a)
Problem p02759 (python)

Fixed submission:
import math
N = int(input())
min_page = math.ceil(N/2)
print(min_page)

Buggy submission (verdict: Runtime Error):
import math

N = [int(input()) for i in range(100)]
min_page = math.ceil(N/2)
print(min_page)

Buggy submission (verdict: Runtime Error):
import math
N = input()
min_page = math.ceil(N/2)
print(min_page)

Buggy submission (verdict: Runtime Error):
page_N = input("Please Number")
min_page = round(page_N / 2)
print(min_page)
Problem p02831 (python)

Fixed submission:
import sys
import fractions

def lcm(x,y):
    return (x * y) // fractions.gcd(x,y)

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import math

def lcm(x,y):
    return (x * y) // math.gcd(x,y)

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])

print(ans)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

import math

def lcm(x,y):
    return (x * y) // math.gcd(x,y)

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])
print(ans)
Problem p02781 (python)

Fixed submission:

"""dp1,2[i][j] 
i桁で0をj個含む数で, 
dp1→ Nの上からi桁目までを抽出した数より小さい
dp2→ Nの上からi桁目までを抽出した数に等しい
"""

N = int(input())
K = int(input())
digit = len(str(N))
N_str = str(N)

dp1 = [[0]*4 for _ in range(digit+1)]
dp2 = [[0]*4 for _ in range(digit+1)]

dp2[0][0] = 1

for i in range(1, digit+1):
    for j in range(4):
        if int(N_str[i-1]) != 0:
            if j >= 1:
                dp2[i][j] = dp2[i-1][j-1]
                dp1[i][j] = dp1[i-1][j]+9*dp1[i-1][j-1]+dp2[i-1][j]+dp2[i-1][j-1]*(int(N_str[i-1])-1)
            else:
                dp1[i][j] = dp1[i-1][j]+dp2[i-1][j]
        else:
            dp2[i][j] = dp2[i-1][j]
            if j >= 1:
                dp1[i][j] = dp1[i-1][j]+9*dp1[i-1][j-1]
            else:
                dp1[i][j] = dp1[i-1][j]

        #print(i, j, dp1[i][j], dp2[i][j])

ans = dp1[digit][K]+dp2[digit][K]

print(ans)

Buggy submission (verdict: Runtime Error):
from math import factorial
N = int(input())
K = int(input())


def n_C_k(n, k):
    factorial_n = factorial(n)
    factorial_k = factorial(k)
    factorial_nk = factorial(n-k)
    return factorial_n//(factorial_k*factorial_nk)

def solve(N, k):
    #ls = list(str(N))
    n = str(N)
    keta = len(n)

    if k == 0:
        return 0

    t = n[0]
    s = ""

    for i in range(keta-1):
        t += "0"
    for i in range(keta-1):
        s += n[i+1]
    return solve2(t, k) + solve(s, k-1)

def solve2(t, k):
    n = str(t)
    keta = len(n)
    #print(keta, )
    if k == 1:
        print(t, k)
        print((keta-1)*9+int(n[0]))
        return (keta-1)*9+int(n[0])
    if k == 2:
        out = 0
        out += (int(n[0])-1)*(keta-1)*9 #最上桁を使う場合
        #print(out, 5555)
        if keta-1 >= 2:
            out += n_C_k(keta-1, 2)*9*9  # 最上桁を使わない場合
        print(t, k)
        print(out)
        return out
    else:
        out = 0
        if keta-1 >= 2:
            out += (int(n[0])-1)*n_C_k(keta-1, 2)*9*9
        if keta-1 >= 3:
            out += n_C_k(keta-1, 3)*9*9*9
        return out

    
ans = solve(N, K)
print(ans)
Problem p02881 (python)

Fixed submission:
N = int(input())
N_sqrt = int(N**(1/2))
for i in range(1,N_sqrt+1):
    if N%i == 0:
        num = i
ans = num+N//num-2
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
N_sqrt = int(N**(1/2))
for i in range(1,N_sqrt):
    if N%i == 0:
        num = i
ans = num+N/num-2
print(ans)
Problem p02948 (python)

Fixed submission:
import sys
import heapq

N,M = [int(k) for k in sys.stdin.readline().split()]

job=[]
for i in range(N):
    A,B = [int(k) for k in sys.stdin.readline().split()]
    job.append((A,-B))

job.sort(key=lambda t: -t[0])

heap=[]
heapq.heapify(heap)

ans=0

for i in range(1,M+1):
    if len(job)!=0:
      while job[-1][0]==i:
          heapq.heappush(heap,job.pop()[1])
          if len(job)==0:
             break
    if len(heap) == 0:
        continue
    ans -= heapq.heappop(heap)
    
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import heapq

N,M = [int(k) for k in sys.stdin.readline().split()]

job=[]
for i in range(N):
    A,B = [int(k) for k in sys.stdin.readline().split()]
    job.append((A,-B))

job.sort(key=lambda t: -t[0])

heap=[]
heapq.heapify(heap)

ans=0

for i in range(1,M+1):
    if len(job)!=0:
      while job[-1][0]==i:
         heapq.heappush(heap,job.pop()[1])
          if len(job)==0:
             break
    if len(heap) == 0:
        continue
    ans -= heapq.heappop(heap)
    
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import heapq

N,M = [int(k) for k in sys.stdin.readline().split()]

job=[]
for i in range(N):
    A,B = [int(k) for k in sys.stdin.readline().split()]
    job.append((A,-B))

job.sort(key=lambda t: -t[0])

heap=[]
heapq.heapify(heap)

ans=0

for i in range(1,M+1):
    if len(job)!=0:
      while job[-1][0]==i:
         heapq.heappush(heap,job.pop()[1])
          if len(job)==0:
             break
    if len(heap) == 0:
        continue
    ans -= heapq.heappop(heap)
    
print(ans)
Problem p02835 (python)

Fixed submission:
A, B, C = map(int, input().split())
if A + B + C >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
S = list(input())
ANS = 0
for i in range(len(S)//2):
    if S[i] != S[len(S)-i]:
        ANS += 1

print(ANS)
Problem p02859 (python)

Fixed submission:
r = int(input())
print(r**2)

Buggy submission (verdict: Runtime Error):
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
    for i in range(N/2):
        if Mylist[i] == Mylist[i + N/2]:
        ANSlist.append("Yes")
    if len(ANSlist) == N/2:
        print("Yes")
Problem p02860 (python)

Fixed submission:
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
    for i in range(int(N/2)):
        if Mylist[i] == Mylist[i + int(N/2)]:
            ANSlist.append("Yes")
    if len(ANSlist) == N/2:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
  for i in range(N/2):
    if Mylist[i] == Mylist[i + N/2]:
      ANSlist.append("Yes")
  if len(ANSlist) == N/2:
    print("Yes")
Problem p02879 (python)

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

if A < 10 and B < 10:
    print(A*B)
else:
    print(-1)

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

products = []

for i in range(1,10):
    for j in range(1,10):
        products.append(i*j)

if N in products:
    print("Yes")
else:
    print("No")
Problem p02897 (python)

Fixed submission:
N = int(input())
if N%2 == 1:
  print((N+1)/2/N)
else:
  print(1/2)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
ANS = 0
Mylist = list(map(int, input().split()))
for i in range(N):
  if Mylist[i] >= K:
   	ANS += 1
print(ANS)
Problem p03135 (python)

Fixed submission:
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
print(a/b)

Buggy submission (verdict: Runtime Error):
from sys import stdin
n = int(stdin.readline().rstrip())
l = [int(x) for x in stdin.readline().rstrip().split()]
max = max(l)
sum = sum(l, -1*max)
print("Yes") if sum > max else print("No")
Problem p02759 (python)

Fixed submission:
N = int(input())
print(int(N/2)+N%2)

Buggy submission (verdict: Runtime Error):
bingo = [ input().split() for j in range(3)]
N = int(input())
b = []
for n in range(N):
	b.append(input())
count = 0
total = 0
p = 'No'
for x in range(N):
	for i in range(3):
		for j in range(3):
			count = count + 1
			if bingo[i][j] == b[x]:
				total = total + count
	count = 0
	if total == 6 or total == 12 or total == 15 or total == 18 or total == 24 or total == 33 or total == 36 or total == 27 or total == 30 or total == 39 or total == 31 or total == 25 or total == 32:
		p = 'Yes'
		break
print(p)
Problem p02777 (python)

Fixed submission:
S, T = raw_input().split()
A, B = map(int, raw_input().split())
U = raw_input()
if S == U:
	A -= 1
elif T == U:
	B -= 1
print A, B

Buggy submission (verdict: Runtime Error):
S, T = raw_input().split()
A, B = map(int, raw_input().split())
U = raw_input()


if S == U:
	A -= 1
elif T == U:
	B -= 1

print A, B
Problem p03631 (python)

Fixed submission:
n=input()
if n[0]==n[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n=input()
if n[0]==n[2[]:
    print("Yes")
else:
    print("No")
Problem p03834 (python)

Fixed submission:
s=input().split(",")
print(s[0]+" "+s[1]+" "+s[2])

Buggy submission (verdict: Runtime Error):
s=input().split()
print(s[0]+" "+s[1]+" "+s[2])

Buggy submission (verdict: Runtime Error):
s=input().split()
print(s[0]+" "+s[1]+" "+s[2]+" ")
Problem p03835 (python)

Fixed submission:
k,s=map(int,input().split())
u=min(k,s)
sum=0
if s-2*k>=0:
    for i in range(s-2*k,u+1):
        if s-i<2*k:
            sum+=2*k-s+i+1
        else:
            sum+=1
    print(sum)
elif s-k>=0:
    for i in range(u+1):
        if s-i<k:
            sum+=s-i+1
        else:
            sum+=2*k-s+i+1
    print(sum)
else:
    for i in range(u+1):
        if s-i<2*k:
            sum+=s-i+1
        else:
            sum+=1
    print(sum)

Buggy submission (verdict: Runtime Error):
k,s=map(int,input().split())
u=min(k,s)
sum=0
for i in range(u+1):
    sum+=min(s-i,2k)+1
print(sum)
Problem p02835 (python)

Fixed submission:
x,y,z = map(int,input().split())
if(x+y+z>=22):
    print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
x,y,z = map(int,input())
if(x+y+z>=22):
    print("bust")
else:
  print("win")
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input()
 
if(N % 2 == 1):
    print("No")
    exit()
nn = int(N / 2)
if(S[nn:] != S[:nn]):
    print('No')
else:
    print("Yes")

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

if(N % 2 == 1):
    print("No")
nn = N / 2
if(S[nn:] == S[:nn]):
    print("Yes")
else:
    print('No')
Problem p03012 (python)

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split()))
result=sum(p)
for i in range(n-2):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy submission (verdict: Runtime Error):

p=list(map(int,input().split()))
n=input()
result=sum(p)
for i in range(n-2):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split()))
result=sum(p)
for i in range(n-2):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split(" ")))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split(" ")))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Buggy submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split()))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Buggy submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Buggy submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Buggy submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=[]
for i in range(n):
    s1 = sum(p[:i])
    s2 = sum(p[i:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])
Problem p03631 (python)

Fixed submission:
n_str = input()
n_list = list(n_str)
n_list_reverse = list(n_str)
n_list_reverse.reverse()
if n_list == n_list_reverse:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n_str = input()
n_list = list(n_str)
n_list_reverse = list(n_str)
n_list_reverse.reverse()
if n_list == n_list_reverse():
    print("Yes")
else:
    print("No")
Problem p02829 (python)

Fixed submission:
A = int(input())
B = int(input())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)

print(ans[0])

Buggy submission (verdict: Runtime Error):
A, B = list(map(int, input().split()))
ans = [1,2,3]
ans.remove(A)
ans.remove(B)

print(ans[0])
Problem p02832 (python)

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

i = 0
err = True
for num in arr:
  if num == i + 1:
    i += 1
    err = False
if err:
  print(-1)
else:
  print(N - i)

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

i = 1
while i <= len(arr):
  while arr[i - 1] != i and i <= len(arr):
    arr.pop(i - 1)
  if arr[i - 1] == i:
    if i == len(arr):
      print(N - i)
      exit(0)
    else:
      i += 1
  else:
    print(-1)
    exit(0)
Problem p02862 (python)

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

def nCr(n, r, mod=10**9+7):
    n1, r = n+1, min(r, n-r)
    numer = denom = 1
    for i in range(1, r+1):
        numer = numer * (n1-i) % mod
        denom = denom * i % mod
    return numer * pow(denom, mod-2, mod) % mod

if (2*X-Y)%3 != 0 or (2*Y-X)%3 != 0 or Y > X*2 or X > Y*2:
  print(0)
else:
  m = (2*X-Y)//3
  n = (2*Y-X)//3
  print(nCr(m+n, n))

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

def f(x, p):
    a = 1
    for i in range(1, x + 1):
        a *= i
        a %= p
    return a
def nCr(a, b, p):
    if a < 0 or b < 0:
        return 0
    elif a < b:
        return 0
    c = 1
    c *= f(a, p)
    c *= pow(f(b, p), p - 2, p)
    c *= pow(f(a - b, p), p - 2, p)
    return c % p

if (2*X-Y)%3 != 0 or (2*Y-X)%3 != 0 or Y > X*2 or X > Y*2:
  print(0)
else:
  m = (2*X-Y)//3
  n = (2*Y-X)//3
  print(nCr(m+n, n))
Problem p02880 (python)

Fixed submission:
A = int(input())
def calc(A):
  for i in range(1, 10):
    for j in range(1, 10):
      if i*j == A:
        return 'Yes'
  return 'No'
print(calc(A))

Buggy submission (verdict: Runtime Error):
A = int(input())
for i in 9:
  for j in 9:
    if i*j == A:
      print('Yes')
print('No')
Problem p02759 (python)

Fixed submission:
import sys
import math

for line in sys.stdin.readlines():
    n = float(line)
    ans = math.ceil(n / 2)
    print(ans, end="")
    break

Buggy submission (verdict: Runtime Error):
import sys
import math

for line in sys.stdin.readline():
    g = float(line.rstrip())
    ans = math.ceil(n/2)
    print(ans,end="")
    break

Buggy submission (verdict: Runtime Error):
import sys
import math

for line in sys.stdin.readline():
    g = float(line.rstrip())
    ans = math.ceil(n/2)
    print(ans,end="")
    break
Problem p02759 (python)

Fixed submission:
import sys,math
N = int(input())
print(math.ceil(N/2))

Buggy submission (verdict: Runtime Error):
lines = [x.strip() for x in sys.stdin.readlines()]
def solve(lines):
    N = int(lines.pop(0))
    print(math.ceil(N/2))
solve(lines)

Buggy submission (verdict: Runtime Error):
def solve(lines):
    N = int(lines.pop(0))
    print(math.ceil(N/2))
solve(lines)
Problem p03135 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    T,X = map(float, lines.pop(0).split(' '))
    print('{:.10f}'.format(T/X))
#
# main
#

# 1. use list instead of stdin

# contents = '''\
# 99 1\
# '''
# lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Buggy submission (verdict: Runtime Error):
    # -*- coding: utf-8 -*-
    import sys
    # ----------------------------------------------------------------
    # Use Solve Function
     
    def solve(lines):
        T,X = map(float, lines.pop(0).split(' '))
        print('{:.10f}'.format(T/X))
    #
    # main
    #
     
    # 1. use list instead of stdin
     
    # contents = '''\
    # 99 1\
    # '''
    # lines = contents.split('\n')
     
    # 2. use stdin
     
    lines = [x.strip() for x in sys.stdin.readlines()]
     
    #
    # solve !!
    #
    solve(lines)
Problem p03137 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N,M = map(int, lines.pop(0).split(' '))
    X = list(map(int, lines.pop(0).split(' ')))
    if N >= M:
        print(0)
        sys.exit(0)
    X.sort()
    span = []
    for i in range(M-1):
        span.append( X[i+1] - X[i] )
    span.sort()
    for i in range(N-1):
        span.pop(-1)
    print(sum(span))

#
# main
#

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    if N >= M:
        print(0)
        sys.exit(0)
    N,M = map(int, lines.pop(0).split(' '))
    X = list(map(int, lines.pop(0).split(' ')))
    X.sort()
    span = []
    for i in range(M-1):
        span.append( X[i+1] - X[i] )
    span.sort()
    for i in range(N-1):
        span.pop(-1)
    print(sum(span))

#
# main
#

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N,M = map(int, lines.pop(0).split(' '))
    X = list(map(int, lines.pop(0).split(' ')))
    X.sort()
    span = []
    for i in range(M-1):
        span.append( X[i+1] - X[i] )
    span.sort()
    for i in range(N-1):
        span.pop(-1)
    print(sum(span))

#
# main
#

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N,M = map(int, lines.pop(0).split(' '))
    X = list(map(int, lines.pop(0).split(' ')))
    X.sort()
    span = []
    for i in range(M-1):
        span.append( X[i+1] - X[i] )
    span.sort()
    for i in range(N-1):
        span.pop(-1)
    print(sum(span))

#
# main
#

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)
Problem p02779 (python)

Fixed submission:
import  collections
def resolve():
    N = int(input())
    A = list(map(int,input().split()))
    c = collections.Counter(A)
    C = max(c.values())
    if C > 1 :
        print('NO')
    else:
        print('YES')
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = list(map(int,input().split()))
    c = collections.Counter(A)
    C = max(c.values())
    if C > 1 :
        print('NO')
    else:
        print('YES')
resolve()
Problem p02951 (python)

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

S = c - a + b
if S > 0 :
            print (S)
else :
            print ("0")

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

S = c - a + b
if S > 0 :
            print (S)
else :
            print ("0")
Problem p02766 (python)

Fixed submission:
N, K = map(int, input().split())
def Base_10_to_n(N, K):
    if (int(N/K)):
        return Base_10_to_n(int(N/K), K)+str(N%K)
    return str(N%K)

x10 = 35
x2 = Base_10_to_n(N, K)
x2 = str(x2)
print(len(x2))

Buggy submission (verdict: Runtime Error):
def Base_10_to_n(N, K):
    if (int(N/K)):
        return Base_10_to_n(int(N/K), K)+str(N%K)
    return str(N%K)

x10 = 35
x2 = Base_10_to_n(N, K)
x2 = str(x2)
print(len(x2))
Problem p03242 (python)

Fixed submission:
nyu = input()
list(nyu)

for i in nyu:
    if i == "1":
        print("9", end="")
    elif  i == "9":
        print("1", end="")
print()

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

for i in nyu:
    if i == "1":
        print("9", end="")
    elif  i == "9":
        print("1", end="")
print()

Buggy submission (verdict: Runtime Error):
list = [int(input().split(''))for i in range(3)]

for i in range(3):
    if list[i] == 1:
        print(9, end="")
    elif list[i] == 9:
        print(9, end="")

print()

Buggy submission (verdict: Runtime Error):
list = [int(input().splir\t(''))for i in range(3)]

for i in range(3):
    if list[i] == 1:
        print(9, end="")
    elif list[i] == 9:
        print(9, end="")

print()

Buggy submission (verdict: Runtime Error):
list = [int(input(''))for i in range(3)]

for i in range(3):
    if list[i] == 1:
        print(9, end="")
    elif list[i] == 9:
        print(9, end="")

print()

Buggy submission (verdict: Runtime Error):
list = [int(input())for i in range(3)]

for i in range(3):
    if list[i] == 1:
        print(9, end="")
    elif list[i] == 9:
        print(9, end="")

print()
Problem p03315 (python)

Fixed submission:
a = list(input())

output = 0

for i in a:
    if i == '+':
        output += 1
    elif i == '-':
        output -= 1

print(output)

Buggy submission (verdict: Runtime Error):
a = list(map(input().split('')))

output = 0

for i in range(len(a)):
    if a[i] == '+':
        output += 1
    elif a[i] == '-':
        output -= 1
}

print(output)
Problem p02879 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if a < 10 and b < 10:
  return a * b
else:
  return -1
Problem p02759 (python)

Fixed submission:
#!/usr/bin/env python3
from itertools import product, permutations, combinations
from bisect import bisect_right,bisect_left
INF = float('inf')

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

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from itertools import product, permutations, combinations
from bisect import bisect_right,bisect_left
INF = float('inf')

N=int(input())
if N % 2 == 0:
    print(N//2)
else
    print(N//2 + 1)
Problem p02860 (python)

Fixed submission:
n=int(input())
s=input()

if n % 2 != 0:
  print('No')
else:
  m = int(n/2)
  if s[:m] == s[m:]:
    print('Yes')
  else:
    print('No')

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

if n % 2 != 0:
  print('No')
else:
  m = n/2
  if s[:m-1] == s[m:]:
    print('Yes')
Problem p02879 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int, input())
if (1 <= a and a <= 9) and (1<= b and b <= 9):
    print(a*b)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
a,b=map(int, input())
if 1 <= a <= 9 and 1<= b <= 9:
    print(a*b)
else:
    print(-1)