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

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

i=1
a=r*x-D

while i<=10:
	print(a)
	a=r*a-D
	i+=1

Buggy submission (verdict: Runtime Error):
r,D,x=map(int,input().split())

i=1
a=r*x-D
while i<=10:
	print(a)
    a=r*a-D
	i+=1
Problem p03038 (python)

Fixed submission:
N,M=map(int,input().split())
arr=[int(x) for x in input().split()]
s=[list(map(int,input().split())) for y in range(M)]
s.sort(key=lambda z: z[1], reverse=True)

sum_a=0
for a,b in s:
    arr+=[b]*a
    sum_a+=a
    if sum_a>=N:
        break

lst=sorted(arr)
ans=sum(lst[-N:])
print(ans)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
arr=[int(x) for x in input().split()]
s=[list(map(int,input().split())) for y in range(M)]
s(key=lambda z: z[1], reverse=True)

sum_a=0
for a,b in s:
    arr+=[b]*a
    sum_a+=a
    if sum_a>=N:
        break

lst=sorted(arr)
ans=sum(lst[-N:])
print(ans)
Problem p02676 (python)

Fixed submission:
K = int(input())
S = input()
Sl = len(S)
if Sl <= K:
  ans = S
else:
  newS = S[0 : K]
  ans = (newS + "...")
print(ans)

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()
Sl = len(S)
if Sl <= K:
  ans = S
else:
  newS = S[0 :: K - 1]
  ans = (newS + "...")
print(ans)

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()
Sl = len(S)
if Sl <= K:
  ans = S
else:
  newS = S[0 : Sl - 1].append("...")
  ans = newS
print(ans)
Problem p02594 (python)

Fixed submission:
X = int(input())

if X>=30:
  print('Yes')
else:
  print('No')

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

if X>=30:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
input(X)

if X>=30:
  print('Yes')
else:
  print('No")

Buggy submission (verdict: Runtime Error):
if X>= 30:
  print('Yes')
else:
  print('No')
Problem p02659 (python)

Fixed submission:
a, b = input().split()  # まず文字列で受け取ります
p = int(a) # aはそのままint型にします
q = int(b[0] + b[2] + b[3])  # b[0] + b[2] + b[3]を整数に変換すれば、bの100倍を正確に得られます

print(p * q // 100)  # 掛けて100で整数の割り算をすれば終わりです

Buggy submission (verdict: Runtime Error):
a=int(input())
b=float(input())
 
print((a*(b*100))/100)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=float(input())
 
print((a*(b*100))//100)

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

print((a*(b*100))//100)
Problem p02707 (python)

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

ans = [0] * n

for i in a:
    ans[i - 1] += 1

for i in ans:
    print(i)

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

for i in (1,n+1)
	print(a.count(i))
Problem p02711 (python)

Fixed submission:
n=input()
 
ans=int(n.count("7"))
 
if ans>=1:
	print("Yes")
    
else:
	print("No")

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

ans=count(n)

if ans>=1:
	print("Yes")
    
else:
	print("No")
Problem p02712 (python)

Fixed submission:
n=int(input())
 
ans=0
 
for i in range(1,n+1):
	if i%3!=0 and i%5!=0:
		ans+=i
      
print(ans)

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

ans=0

for i in range(1,n+1):
	if i%3!=0 and i%5!=0
		ans+=i
      
print(ans)
Problem p02880 (python)

Fixed submission:
n=int(input())
 
list=[]
 
for i in range(1,10):
	for j in range(1,10):
		list.append(i*j)
    
if n in list:
	print("Yes")
else:
	print("No")

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

list=[]

for i in range(1,10)
	for j in range(1,10)
		list.append(i*j)
    
if n in list:
	print("Yes")
else:
	print("No")
Problem p02578 (python)

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

stage_hight = []
for i, ai in enumerate(A):
	if i != 0 and ai < A[i-1]:
		stage_hight.append(A[i-1] - ai)
		A[i] = A[i-1]
print(sum(stage_hight))

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

stage_hight = []
for i, ai in enumerate(A):
	if not i and ai < A[i-1]:
		stage_hight.append(A[i-1] - ai)
		A[i] = A[i-1]
print(sum(stage_hight))
Problem p02676 (python)

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


if len(S) <= K:
    print(S)
else:
    print(f'{S[:K]}...')

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


if len(S) > K:
  print(S)
else:
  print(S[:K], '...')
Problem p02881 (python)

Fixed submission:
import math
N =int(input())
sq=int(math.sqrt(N))
for i in range(sq,0,-1):
    if N%i==0:
        print(i+N//i-2)
        break

Buggy submission (verdict: Runtime Error):
import math
a,b,x =map(int,input().split( ))
if x >= (a**2*b/2):
    k=2*x/(a**2)-b
    cos=math.sqrt((b-k)**2/((a**2)+(b-k)**2))
    print(90-math.degrees(math.acos(cos)))
else:
    k=2*x/(a*b)
    cos=math.sqrt(b**2/(b**2+k**2))
    print(90-math.degrees(math.acos(cos)))
Problem p02897 (python)

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

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort()
print(len([x for x in h if x >= k])

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort()
a = 0
for index, x in enumerate(h):
  if x == k:
    a += index
    break
print(n - a)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort()
for index, x in enumerate(h):
  if x == k:
    print(n - index)
    break
Problem p02987 (python)

Fixed submission:
print("Yes" if len(set(input()))==2 else "No")

Buggy submission (verdict: Runtime Error):
print('YES' if len(set(input())==2 else 'NO')

Buggy submission (verdict: Runtime Error):
S = sorted(list(input()))
if S[1]==S[2] and S[3]==S[4] and len(S[1])==2
print
	("YES")
else
  	print("NO")
Problem p02771 (python)

Fixed submission:
a = map(int,input().split())
if len(set(a)) == 2:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a =  map(int,intpu().split())
if len(set(a)) == 2:
  print("Yes")
else:
  print("No")
Problem p02835 (python)

Fixed submission:
inp = input()
inpLi = inp.split()
A1 = int(inpLi[0])
A2 = int(inpLi[1])
A3 = int(inpLi[2])

if (A1+A2+A3) >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
A1,A2,A3 = int(input().split(""))
result = A1+A2+A3
if result>= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
inp = input()
inpLi = inp.split("")
A1 = int(inpLi[0])
A2 = int(inpLi[1])
A3 = int(inpLi[2])
result = A1+A2+A3
if result >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
h = int(input())
a1,a2,a3 = h.split()
result = a1+a2+a3
if result>22 or result == 22:
  print("bust")
else:
  print("win")
Problem p02596 (python)

Fixed submission:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    k = int(input())
    if k % 2 == 0 or k % 5 == 0:
        print(-1)
        sys.exit()
    p = 7
    plus = 7
    amari = set()
    r = 1
    while (p % k) != 0:
        if p in amari:
            print(r, -1, p)
            sys.exit()
        else:
            amari.add(p)
            plus = (plus * 10) % k
            p += plus
            p = p % k
            r += 1
    print(r)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
#readlines = sys.stdin.readlines
#from collections import defaultdict
from numba import njit
import numpy as np
def main():
    @njit()
    def s(k):
        rems = np.zeros(k)
        n = 7
        next_digit = 70
        r = 1
        while True:
            rem = n % k
            if rem == 0:
                break
            elif rems[rem]:
                r = -1
                break
            else:
                rems[rem] = 1
                n += next_digit
                next_digit *= 10
                r += 1
        return r
    k = int(input())
    if k % 2 == 0:
        print(-1)
    else:
        print(s(k))


if __name__ == '__main__':
    main()
Problem p02597 (python)

Fixed submission:
import sys
read = sys.stdin.read
def main():
    n = int(input())
    a = input()
    if not 'WR' in a:
        print(0)
        sys.exit()
    a = list(a)
    rnum = a.count('R')
    r = 0
    for i1 in range(rnum):
        r += a[i1] == 'W'
    for j1 in range(n - rnum):
        r += a[rnum + j1] == 'R'
    r = r // 2
    print(r)
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
read = sys.stdin.read
from collections import deque
def main():
    n = int(input())
    a = input()
    if not 'WR' in a:
        print(0)
        sys.exit()
    a = list(a)
    rnum = a.count('R')
    r = 0
    for i1 in range(rnum):
        r += a[i1] == 'W'
    for j1 in range(n - rnum):
        r += a[rnum + j1] == 'R'

    r = r // 2
    print(r)


if __name__ == '__main__':
    main()
Problem p02598 (python)

Fixed submission:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
def main():
    n, k, *a = map(int, read().split())
    def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
    ng = 0
    ok = max(a)
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
from heapq import heapify,heappop,heappush
def main():
    n, k, *a = map(int, read().split())
    minusa = [-ae for ae in a]

    heapify(minusa)
    while k > 0:
        maxa = heappop(minusa)
        heappush(minusa, maxa/2)
        k -= 1
        print(minusa)
    r = heappop(minusa)
    r *= -1
    r = ceil(r)
    print(r)

if __name__ == '__main__':
    main()
Problem p02624 (python)

Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    r = 0
    for i1 in range(1, n):
        y = n // i1
        r += y * (y + 1) * i1 / 2
    print(int(r))

if __name__ == '__main__':
    main()
Problem p02773 (python)

Fixed submission:
from collections import Counter
def main():
  n = int(input())
  s = [input() for _ in range(n)]
  s_c = Counter(s)
  s_c_l = [c for c in s_c.items()]
  m = max([c[1] for c in s_c_l])
  s_c_l_max = [c[0] for c in s_c_l if c[1] == m]
  s_c_l_max_s = set(s_c_l_max)
  s_c_l_max_s = sorted(s_c_l_max_s)
  for ch in s_c_l_max_s:
    print(ch)
  
main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
from collections import Counter
def main():
    n, *s = read().split()
    n = int(n)
    sc = Counter(s)
    scm = sc.most_common()
    maxnum = scm[0][1]
    r = []
    for i1 in range(n):
        if scm[i1][1] == maxnum:
            r.append(scm[i1][0])
        else:
            break
    r.sort()
    print(*r, sep="\n")

if __name__ == '__main__':
    main()
Problem p02829 (python)

Fixed submission:
a_list = []
a_list.append(int(input()))
a_list.append(int(input()))

if 1 not in a_list:
  print(1)
elif 2 not in a_list:
  print(2)
else:
  print(3)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
print(6 - a - b)

Buggy submission (verdict: Runtime Error):
a_set = {}
a_set.add(int(input()))
a_set.add(int(input()))

all_set = {1,2,3}
print(all_set.difference(a_set)[0])
Problem p02831 (python)

Fixed submission:
def main():
    x, y = map(int, input().split())
    mul_xy = x * y
    while True:
        x, y = y, x % y
        if not y:
            break
    print(int(mul_xy / x))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from math import gcd
def main():
    a, b = = map(int, input().split())
    r = (a * b) // gcd(a, b)
    print(r)

if __name__ == '__main__':
    main()
Problem p02847 (python)

Fixed submission:
d = ['SUN','MON','TUE','WED','THU','FRI','SAT'].index(input())
print(7 - d)

Buggy submission (verdict: Runtime Error):
d = ['SUN','MON','TUE','WED','THUv,'FRI','SAT'].index(input())
print(7 - d)
Problem p02862 (python)

Fixed submission:
import sys
input = sys.stdin.readline
large_p = 10**9 + 7

def comb_mod(n, r, large_p):
    a, b = 1, 1
    r = min(r, n - r)
    for i in range(r):
        a = a * (n - i) % large_p
        b = b * (r - i) % large_p
    return a * pow(b, large_p - 2, large_p) % large_p

def main():
    x, y = map(int, input().split())
    if (x + y) % 3 != 0:
        print(0)
        sys.exit()
    p1, p2 = 0, 0
    for i1 in range(0, x + 1):
        if x - i1 == (y - i1 * 2) * 2:
            p1 = i1
            p2 = y - i1 * 2
            break
    if p1 < 0 or p2 < 0 or (p1 == 0 and p2 == 0):
        print(0)
        sys.exit()

    r = comb_mod(p1 + p2, p1, large_p)
    print(r)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):

import sys
input = sys.stdin.readline
from math import factorial
large_p = 10**9 + 7

def comb_mod(n, r, large_p):
    a, b = 1, 1
    r = min(r, n - r)
    for i in range(r):
        a = a * (n - i) % large_p
        b = b * (r - i) % large_p
    return a * pow(b, large_p - 2, large_p) % large_p

def main():
    x, y = map(int, input().split())
    p1, p2 = 0, 0
    p1_2, P2_2 = 0, 0
    for i1 in range(1, x//2 + 1):
        if x - i1 == (y - i1 * 2) * 2:
            p1 = i1
            p2 = y - i1 * 2
            break
    for i2 in range(1, y//2 + 1):
        if (x - i2 * 2) * 2 == y - i2:
            p1_2 = i2
            p2_2 = x - i2 * 2

    p1 = min(p1, p1_2)
    p2 = min(p2, p2_2)
    r = comb_mod(p1 + p2, p1, large_p)
    print(r)

if __name__ == '__main__':
    main()
Problem p02897 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
r = ((r//2) + (r%2))  / n
print(r)

Buggy submission (verdict: Runtime Error):
n = int(input())
r = ((r//2) + (r%2))  / r
print(r)
Problem p03013 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
kazu_tmp = 0
def f(target_step):
    global kazu_memo, kazu_tmp
    #print(target_step)
    if target_step < 0:
        return 0
    else:
        if kazu_memo[target_step] >= 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = (f(target_step - 1) + f(target_step - 2)) % large_p
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    kazu_memo = {e: -1 for e in range(0, n + 1)}
    kazu_memo[0] = 1
    for _ in range(m):
        ta = int(input())
        kazu_memo[ta] = 0

    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp % large_p
            return kazu_tmp % large_p

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()
Problem p03041 (python)

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

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

r = S[:K]
r = r + S[K].lower()
r = r + S[K+1:]

print(r)
Problem p03075 (python)

Fixed submission:
l1 = []
for _ in range(6):
  l1.append(int(input()))
 
if (l1[4] - l1[0]) > l1[5]:
  r = ':('
else:
  r = 'Yay!'
  
  
print(r)

Buggy submission (verdict: Runtime Error):
l1 = []
for _ in range(6):
  l1.append(int(input())
 
if (l1[4] - l1[0]) > l1[5]:
  r = ':('
else:
  r = 'Yay!'
  
  
print(r)

Buggy submission (verdict: Runtime Error):
l1
for _ in range(6):
  l1.append(int(input()))

if (l1[4] - l1[0]) < l1[5]:
  r = ':('
else:
  r = 'Yay!'
  
  
print(r)
Problem p03242 (python)

Fixed submission:
s = input()
r = 0
if s[0] == '1':
  r += 900
else:
  r += 100
if s[1] == '1':
  r += 90
else:
  r += 10 
if s[2] == '1':
  r += 9
else:
  r += 1 
print(r)

Buggy submission (verdict: Runtime Error):
s = input().split()
r = 0
if s[0] == '1':
  r += 900
else:
  r += 100
if s[1] == '1':
  r += 90
else:
  r += 10 
if s[2] == '1':
  r += 9
else:
  r += 1 

print(r)
Problem p03250 (python)

Fixed submission:
A,B,C = map(int, input().split())
r = max(A,B,C)*9 + A+B+C
print(int(r))

Buggy submission (verdict: Runtime Error):
A,B,C = map(int, input().split())
r = max(A,B,C)*9 + sum(A, B, C)
print(int(r))
Problem p03631 (python)

Fixed submission:
N = input()

rN = N[::-1]
if N == rN:
  r = 'Yes'
else:
  r = 'No'
 
print(r)

Buggy submission (verdict: Runtime Error):
N = input()
 
rN = N[::-1]
if N = rN:
  r = 'Yes'
else:
  r = 'No'

print(r)

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

if N = N[::-1]:
  r = 'Yes'
else:
  r = 'No'

print(r)
Problem p03774 (python)

Fixed submission:
n, m = map(int,input().split())
students = [None]*n
points = [None]*m
for i in range(n):
  students[i] = tuple(map(int,input().split()))
for i in range(m):
  points[i] = tuple(map(int,input().split()))

ans = []
for s in students:
  tmp = []
  for p in points:
    tmp.append(abs(s[0] - p[0]) + abs(s[1] - p[1]))
  ans.append(tmp.index(min(tmp)) + 1)
for i in range(n):
  print(ans[i])

Buggy submission (verdict: Runtime Error):
n, m = map(int,input().split())
students = [None]*n
points = [None]*m
for i in range(n):
  students[i] = tuple(map(int,input().split()))
for i in range(m):
  points[i] = tuple(map(int,input().split()))

ans = [None]*n
for s in students:
  tmp = [None]*m
  for p in points:
    tmp[p] = abs(students[s][0] - points[p][0]) + abs(students[s][1] - points[p][1])
  ans[s] = tmp.index(min(tmp))
for i in range(n):
  print(ans[i])
Problem p03775 (python)

Fixed submission:
from itertools import combinations
from functools import reduce
from operator import mul
def prime_dec(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(n)
  return table

n = int(input())
ps = prime_dec(n)
ps = [1] if len(ps) == 0 else ps
ps_com = []
for i in range(len(ps)):    
    ps_com += set(combinations(ps, i+1))
divs = [reduce(mul, k) for k in ps_com if not len(k) == 0]
divs_twin = [(k, int(n/k)) for k in divs]
divs_twin = set(divs_twin)
divs_twin_len = [max(len(str(k[0])) ,len(str(k[1])))  for k in divs_twin]

print(min(divs_twin_len))

Buggy submission (verdict: Runtime Error):
from itertools import combinations
from functools import reduce
from operator import mul
def prime_dec(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(n)
  return table

n = int(input())
ps = prime_dec(n)
ps_com = []
for i in range(len(ps)):    
    ps_com += set(combinations(ps, i))
divs = [reduce(mul, k) for k in ps_com if not len(k) == 0]
divs_twin = [(k, int(n/k)) for k in divs]
divs_twin = set(divs_twin)
divs_twin_len = [max(len(str(k[0])) ,len(str(k[1])))  for k in divs_twin]

print(min(divs_twin_len))
Problem p02627 (python)

Fixed submission:
a=input()
if ord(a)<ord('a'):
  print('A')
else:
  print('a')

Buggy submission (verdict: Runtime Error):
a=input()
if ord(a)<ord('a'):
  print(A)
else:
  print(a)
Problem p02659 (python)

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

Buggy submission (verdict: Runtime Error):
import collections
n=int(input())
if n==1:
  print(0)
  exit()
b=int(n**0.5)
i=2
l=[]
while i<=b:
  if n%i==0:
    l.append(i)
    n=n//i
  else:
    i+=1
if n>b:
  l.append(n)
c=collections.Counter(l)
v=list(c.values())
ans=0
for vv in v:
  wa=1
  s=1 
  while True:
    if vv<wa:
      break
    s+=1
    wa+=s
  ans+=(s-1)
print(ans)

Buggy submission (verdict: Runtime Error):
import collections
n=int(input())
if n==1:
  print(0)
  exit()
b=int(n**0.5)
i=2
l=[]
while i<=b:
  if n%i==0:
    l.append(i)
    n=n//i
  else:
    i+=1
if n>b:
  l.append(n)
c=collections.Counter(l)
v=list(c.values())

ans=0
for vv in v:
  wa=1
  s=1 
  while True:
    if vv<wa:
      break
    s+=1
    wa+=s
  ans+=(s-1)
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=input().split()
x,d,y,z=b
nb=int(x)+int(y+z)/100
print(int(a*nb))

Buggy submission (verdict: Runtime Error):
a,b=input().split()
x,d,y,z=b
nb=int(x)+(y+z)/100
print(int(a*nb))
Problem p02682 (python)

Fixed submission:
a,b,c,k=map(int,input().split())
if a>=k:
  print(k)
elif a<k and b>=k-a:
  print(a)
else:
  print(2*a+b-k)

Buggy submission (verdict: Runtime Error):
a,b,c,k=map(int,input().split())
if a>=k:
  print(k)
elif a<k and b>=k-a:
  print(a)
else:
  print(2a+b-k)