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

Fixed submission:
import math


# 最大公約数gcd,
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


# 最小公倍数lcm
def lcm(a, b):
    return (a * b) // gcd(a, b)


a, b, c, d = (int(i) for i in input().split())

cd = lcm(c, d)
r = b - a + 1

min_c = a // c + (1 if a % c != 0 else 0)
max_c = b // c
min_d = a // d + (1 if a % d != 0 else 0)
max_d = b // d
min_cd = a // cd + (1 if a % cd != 0 else 0)
max_cd = b // cd

c_num = max_c - min_c + 1
d_num = max_d - min_d + 1
cd_num = max_cd - min_cd + 1

print(r - c_num - d_num + cd_num)

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D = [int(i) for i in input().split()]
def lcm(a,b):
    return a*b//math.gcd(a,b)
lcm = lcm(C,D)
aa = ((B//C)-(1 if A%C != 0 else 0))-(A//C)+1
bb = ((B//D)-(1 if A%D != 0 else 0))-(A//D)+1
ll = ((B//lcm)-(1 if A%lcm != 0 else 0))-(A//lcm)+1
print(int((B-A+1)-(aa+bb-ll)))

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D = [int(i) for i in input().split()]
def lcm(a,b):
    return a*b//math.gcd(a,b)
lcm = lcm(C,D)
aa = ((B//C)-(1 if A%C != 0 else 0))-(A//C)+1
bb = ((B//D)-(1 if A%D != 0 else 0))-(A//D)+1
ll = ((B//lcm)-(1 if A%lcm != 0 else 0))-(A//lcm)+1
print(int((B-A+1)-(aa+bb-ll)))

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D = [int(i) for i in input().split()]
def lcm(a,b):
    return a*b/math.gcd(a,b)
lcm = lcm(C,D)
aa = ((B//C)-(1 if A%C != 0 else 0))-(A//C)+1
bb = ((B//D)-(1 if A%D != 0 else 0))-(A//D)+1
ll = ((B//lcm)-(1 if A%lcm != 0 else 0))-(A//lcm)+1
print(int((B-A+1)-(aa+bb-ll)))

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D = [int(i) for i in input().split()]
def lcm(a,b):
    return a*b/math.gcd(a,b)
lcm = lcm(C,D)
aa = ((B//C)+(1 if A%C == 0 else 0))-(A//C)
bb = ((B//D)+(1 if A%D == 0 else 0))-(A//D)
ll = ((B//lcm)+(1 if A%lcm == 0 else 0))-(A//lcm)
print(int((B-A+1)-(aa+bb-ll)))

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D = [int(i) for i in input().split()]
ii = 1
ee = 1
dd = 0
for i in range(A,B+1):
    if i % C == 0:
        z = i
        break
for i in range(A,B+1):
    if i % D == 0:
        v = i
        break
rr = z
while rr < B:
    rr += C
    ii += 1
ll = v
while ll < B:
    ll += C
    ee += 1
    if ll % (C*D) == 0:
        dd += 1
print(int((B-A+4)-(ii+ee-dd)))
Problem p03000 (python)

Fixed submission:
import sys
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = 0
i = 0
while D <= X:
    D = (D + L[i])
    i += 1
    if i == N and D <= X:
        print(i+1)
        sys.exit()
print(i)

Buggy submission (verdict: Runtime Error):
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = 0
i = 0
while D <= X:
    D = (D + L[i])
    i += 1
print(i)

Buggy submission (verdict: Runtime Error):
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = 0
i = 0
while D <= X:
    D = (D + L[i])
    i += 1
print(i)
Problem p03029 (python)

Fixed submission:
A, P = map(int, input().split(' '))
print((3*A+P)//2)

Buggy submission (verdict: Runtime Error):
A, P = map(int, input(' '))
print((3*A+P)//2)
Problem p03031 (python)

Fixed submission:
import sys
import math
from collections import deque
import itertools
import copy
import bisect

MOD = 10 ** 9 + 7
INF = 10 ** 18 + 7
input = lambda: sys.stdin.readline().strip()
ans = 0
N, M = map(int, input().split())
ks = [tuple(map(int, input().split())) for _ in range(M)]
p = list(map(int, input().split()))
t = []
for i in range(N):
    tt = list(itertools.combinations(range(1, N+1), i+1))
    for l in tt:
        t.append(l)
t.append(tuple())
for i in range(len(t)):
    pp = 0
    for l in range(M):
        if len(set(ks[l][1:]) & set(t[i])) % 2 == p[l]:
            pp += 1
    if pp == M:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

N, M = map(int, input().split())
s = [list(map(int, input().split()))[1:] for _ in range(M)]
p = list(map(int, input().split()))


def switch(bit, ans):
    check = [(bit >> i) & 1 for i in range(N)]
    light = 0
    for i in range(M):
        num = 0
        for l in s[i]:
            if check[l - 1] == 1:
                num += 1
        if num % 2 == p[i]:
            light += 1
    if light == M:
        ans += 1
    if bit == 1:
        return ans
    else:
        return switch(bit - 1, ans)


print(switch(2 ** N, 0))

Buggy submission (verdict: Runtime Error):
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

N, M = map(int, input().split())
s = [list(map(int, input().split()))[1:] for _ in range(M)]
p = list(map(int, input().split()))


def switch(bit, ans):
    check = [(bit >> i) & 1 for i in range(N)]
    light = 0
    for i in range(M):
        num = 0
        for l in s[i]:
            if check[l - 1] == 1:
                num += 1
        if num % 2 == p[i]:
            light += 1
    if light == M:
        ans += 1
    if bit == 1:
        print(ans)
    else:
        switch(bit - 1, ans)


switch(2 ** N, 0)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
s = [list(map(int,input().split()[1:])) for _ in range(M)]
p = list(map(int,input().split()))
ret = 0
for b in range(1 << N):
    if all(sum((b >> (i-1))) & 1 for i in s[j] % 2 == p[j] for j in range(M)):
        ret += 1
print(ret)
Problem p03035 (python)

Fixed submission:
A, B =map(int, input().split() )
if A >= 13 :
    print(B)
elif A >=6 and A<=12 :
    print(B // 2)
else :
    print(0)

Buggy submission (verdict: Runtime Error):
A, B =list (map (int, input().split(' ') ) )
if A > = 13 :
    print(B)
elif A < = 5 :
    print(0)
else :
    print(B/2)
Problem p03037 (python)

Fixed submission:
import sys
N,M = map(int,input().split())
L = []
R = []
for i in range(M):
    a =list(map(int,input().split()))
    L.append(a[0])
    R.append(a[1])
LL = L[0]
RR = R[0]
for i in range(1,M):
    if L[i]>RR or LL>R[i]:
        print(0)
        sys.exit()
    elif LL>=L[i] and RR>=R[i]:
        RR=R[i]
    elif LL>=L[i] and RR<R[i]:
        continue
    elif L[i]>=LL and R[i]>=RR:
        LL = L[i]
    elif L[i]>=LL and R[i]<RR:
        continue
print(RR-LL+1)

Buggy submission (verdict: Runtime Error):
import sys
N,M = map(int,input().split())
L = []
R = []

LL = L[0]
RR = R[0]
for i in range(1,M):
    if L[i]>RR or LL>R[i]:
        print(0)
        sys.exit()
    else :
        LL = max(LL,L[i])
        RR = min(RR,R[i]) 
print(RR-LL+1)
Problem p03043 (python)

Fixed submission:
import math
N,K = map(int,input().split())
r = 0
for i in range(1,N+1):
    if i >= K:
        r += 1/N
    else:
        l = math.ceil(math.log2(K / i))
        r += ((1 / 2) ** l)/N
print(r)

Buggy submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
r = 0
for i in range(1,N+1):
    if i >= K:
        r += 1/N
    else:
        l = math.ceil(math.log2(K / i))
        r += ((1 / 2) ** l)/N
print(r)

Buggy submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
r = 0
for i in range(1,N+1):
    if i >= K:
        r += 1/N
    else:
        l = math.ceil(math.log2(K / i))
        r += ((1 / 2) ** l)/N
print(r)

Buggy submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
r = 0
for i in range(1,N+1):
    if i>=K:
        continue
    else:
        l = math.ceil(math.log2(K / i))
        r += ((1 / 2) ** l)/N
print(float(r))

Buggy submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
r = 0
for i in range(1,N+1):
        l = math.ceil(math.log2(K / i))
        r += ((1 / 2) ** l)/N
print(r)
Problem p03059 (python)

Fixed submission:
A,B,T = map(int,input().split())
print(int(((T+0.5)//A)*B))

Buggy submission (verdict: Runtime Error):
A,B,T = map(int,input().split)
print(int(((T+0.5)//A)*B))

Buggy submission (verdict: Runtime Error):
print(int(((T+0.5)//A)*B))
Problem p03071 (python)

Fixed submission:
A,B = map(int,input().split())
if A == B:
  print(2*A)
else:
  print(max(2*A-1,2*B-1))

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A == B:
  print(2A)
else:
  print(2*max(A,B))

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A == B:
  print(2A)
else:
  print(2*max(A,B))
Problem p03076 (python)

Fixed submission:
import math
L = [int(input()) for _ in range(5)]
Lm = []
for i in L:
    if i%10 == 0:
        Lm.append(0)
    else:
        Lm.append(10-i%10)
print(sum([10*math.ceil(i/10) for i in L])-max(Lm))

Buggy submission (verdict: Runtime Error):
import math
L = [int(input()) for _ in range(5)]
Lm = 10-min([i%10 for i in L if i%10 != 0])
if not Lm:
    Lm = 0
print(sum([10*math.ceil(i/10) for i in L])-Lm)

Buggy submission (verdict: Runtime Error):
import math
L = [int(input()) for _ in range(5)]
Lm = 10-min([i%10 for i in L if i%10 != 0])
print(sum([10*math.ceil(i/10) for i in L])-Lm)

Buggy submission (verdict: Runtime Error):
import math
L = list(map(int,open(0).read().split()))
Lm = min([i//10 for i in L])
print(sum([10*math.ceil(i/10) for i in L])-Lm)
import math
L = list(map(int,open(0).read().split()))
Lm = max([10-(i//10) for i in L])
print(sum([10*math.ceil(i/10) for i in L])-Lm)
Problem p03085 (python)

Fixed submission:
b = (input())
if b == "A":
    print("T")
elif b == "C":
    print("G")
elif b == "T":
    print("A")
else:
    print("C")

Buggy submission (verdict: Runtime Error):
b = int(input())
if b == "A":
    print("T")
elif b == "C":
    print("G")
elif b == "T":
    print("A")
else:
    print("C")
Problem p03109 (python)

Fixed submission:
S = input()
A = sorted([S,"2019/04/30"])
if A[0] == A[1]:
    print("Heisei")
elif A[0] == "2019/04/30":
    print("TBD")
else:
    print("Heisei")

Buggy submission (verdict: Runtime Error):
N = int(input())
m = 0
for _ in range(N):
    x,u = map(str,input().split())
    x = float(x)
    if u == "JPY":
        m += x
    else:
        m += x*380000
print(m)
Problem p03136 (python)

Fixed submission:
N = int(input())
L = list(map(int,input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,L = map(int,open(0).read().split())
L.sort()
if sum(L[::-2]) < L[-1]:
    print("Yes")
else:
    print("No")
Problem p03167 (python)

Fixed submission:
import sys
import math
from collections import deque
import copy

MOD = 10 ** 9 + 7
H, W = map(int, input().split())

a = [["#" for _ in range(W + 2)]]
for i in range(H):
    p = deque(list(input()))
    p.appendleft("#")
    p.append("#")
    a.append(list(p))
a.append(["#" for _ in range(W + 2)])

dp = [[0 for _ in range(W + 10)] for _ in range(H + 10)]
dp[0][1] = 1
for i in range(1, H + 1):
    for l in range(1, W + 1):
        if a[i][l] != "#":
            dp[i][l] = (dp[i][l - 1] + dp[i - 1][l]) % MOD
print(dp[H][W] % MOD)

Buggy submission (verdict: Runtime Error):
import sys
import math
from collections import deque
import copy

MOD = 10 ** 9 + 7
H, W = map(int, input().split())

a = [["#" for _ in range(W + 2)]]
for i in range(H):
    p = deque(list(input()))
    p.appendleft("#")
    p.append("#")
    a.append(list(p))
a.append(["#" for _ in range(W + 2)])

dp = [[0 for _ in range(H + 10)] for _ in range(W + 10)]
dp[0][1] = 1
for i in range(1, H + 1):
    for l in range(1, W + 1):
        if a[i][l] != "#":
            dp[i][l] = (dp[i][l - 1] + dp[i - 1][l]) % MOD
print(dp[H][W] % MOD)
Problem p03261 (python)

Fixed submission:
import sys
N,*W = map(str,open(0).read().split())
N = int(N)
for i in range(N-1):
    if list(W[i])[-1] != list(W[i+1])[0]:
        print("No")
        sys.exit()
if len(W) != len(set(W)):
    print("No")
    sys.exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
import sys
N,*W = map(str,open().read().split())
N = int(N)
for i in range(N-1):
    if list(W[i])[-1] != list(W[i+1])[0]:
        print("No")
        sys.exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
import sys
N,*W = map(str,open().read().split())
N = int(N)
for i in range(N-1):
    if list(N[i])[-1] != list(N[i+1])[0]:
        print("No")
        sys.exit()
print("Yes")
Problem p03285 (python)

Fixed submission:
import sys
N = int(input())
for i in range(100):
    for l in range(100):
        if 4*i + 7*l == N:
            print("Yes")
            sys.exit()
print("No")

Buggy submission (verdict: Runtime Error):
import sys
for i in range(100):
    for l in range(100):
        if 4*i + 7*l == int(input()):
            print("Yes")
            sys.exit()
print("No")
Problem p03477 (python)

Fixed submission:
A,B,C,D = map(int,input().split())
if A+B == C+D:
    print("Balanced")
elif A+B > C+D:
    print("Left")
else:
    print("Right")

Buggy submission (verdict: Runtime Error):
print(48-int(input()))
Problem p03502 (python)

Fixed submission:
N = int(input())
if N % sum([int(i) for i in list(str(N))]) == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
if N%sum(list(str(N))) == 0:
    print("Yes")
else:
    print("No")
Problem p03547 (python)

Fixed submission:
X,Y = map(str,input().split())
XY = ["A","B","C","D","E","F"]
for i in range(6):
    if X == XY[i]:
        XX = i
    if Y == XY[i]:
        YY = i
if XX == YY:
    print("=")
elif XX > YY:
    print(">")
else:
    print("<")

Buggy submission (verdict: Runtime Error):
X,Y = map(str,input().split())
XY = ["A","B","C","D","E","F"]
for i in range(5):
    if X == XY[i]:
        XX = i
    if Y == XY[i]:
        YY = i
if XX == YY:
    print("=")
elif XX > YY:
    print(">")
else:
    print("<")

Buggy submission (verdict: Runtime Error):
X,Y = map(str.input().split())
XY = ["A","B","C","D","E","F"]
for i in range(5):
    if X == XY[i]:
        XX = i
    if Y == XY[i]:
        YY = i
if XX == YY:
    print("=")
elif XX > YY:
    print(">")
else:
    print("<")
Problem p03624 (python)

Fixed submission:
import string
a = set(string.ascii_lowercase)
S = input()
if sorted(list(set(S))) == list(string.ascii_lowercase):
    print("None")
else:
    for i in set(S):
        if i in a:
            a.remove(i)
    print(sorted(list(a))[0])

Buggy submission (verdict: Runtime Error):
import string
a = set(string.ascii_lowercase)
S = input()
if sorted(list((S))) == list(string.ascii_lowercase):
    print("None")
else:
    for i in set(S):
        if i in a:
            a.remove(i)
    print(sorted(list(a))[0])

Buggy submission (verdict: Runtime Error):
import string
a = set(string.ascii_lowercase)
S = input()
if sorted(list((S))) == list(string.ascii_lowercase):
    print("None")
else:
    for i in set(S):
        if i in S:
            a.remove(i)
    print(sorted(list(a))[0])

Buggy submission (verdict: Runtime Error):
import string
a = set(string.ascii_lowercase)
S = input()
if sorted(list((S))) == list(string.ascii_lowercase):
    print("None")
else:
    for i in set(S):
        if i in S:
            a.remove(i)
    print(sorted(list(a))[0])
Problem p03711 (python)

Fixed submission:
a = (1,3,5,7,8,10,12)
b = (4,6,9,11)
c = set([2])
abc = [a,b,c]
x,y = map(int,input().split())
for i, checker in enumerate(abc):
    if x in checker:
        checker2 = checker
if y in checker2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = (1,3,5,7,8,10,12)
b = (4,6,9,11)
c = (2)
abc = [a,b,c]
x,y = map(int,input().split())
for i, checker in enumerate(abc):
    if x in checker:
        checker2 = checker
if y in checker2:
    print("Yes")
else:
    print("No")
Problem p03844 (python)

Fixed submission:
AB = list(map(str,input().split()))
if AB[1] == "+":
    print(int(AB[0])+int(AB[2]))
else:
    print(int(AB[0])-int(AB[2]))

Buggy submission (verdict: Runtime Error):
AB = list(map(str,input().split()))
if AB[1] == "+"
    print(int(AB[0])+int(AB[2]))
else:
    print(int(AB[0])-int(AB[2]))
Problem p03852 (python)

Fixed submission:
if input() in ("a","e","i","o","u"):
    print("vowel")
else:
    print("consonant")

Buggy submission (verdict: Runtime Error):
if input() in set("a","b","c","d","e"):
    print("vowel")
else:
    print("consonant")
Problem p03998 (python)

Fixed submission:
Sa = list(input())
Sb = list(input())
Sc = list(input())
c = 0
for _ in range(10**9):
    if c == "a" and not Sa:
        print("A")
        break
    if c == "b" and not Sb:
        print("B")
        break
    if c == "c" and not Sc:
        print("C")
        break
    if _ == 0:
        c = Sa[0]
        del Sa[0]
    elif c == "a":
        c = Sa[0]
        del Sa[0]
    elif c == "b":
        c = Sb[0]
        del Sb[0]
    else:
        c = Sc[0]
        del Sc[0]

Buggy submission (verdict: Runtime Error):
Sa = list(input())
Sb = list(input())
Sc = list(input())
for _ in range(10**8):
    if _ == 0:
        s = Sa[0]
        if s == "a":
            s = Sa[1]
            del Sa[0]
        elif s == "b":
            s = Sb[1]
            del Sb[0]
        else:
            s = Sc[1]
            del Sc[0]
    elif len(Sa) == 1 and s == "a":
        print("A")
        break
    elif len(Sb) == 1 and s == "b":
        print("B")
        break
    elif len(Sc) == 1 and s == "c":
        print("C")
        break
    else:
        if s == "a":
            s = Sa[1]
            del Sa[0]
        elif s == "b":
            s = Sb[1]
            del Sb[0]
        else:
            s = Sc[1]
            del Sc[0]
Problem p04011 (python)

Fixed submission:
N,K,X,Y = map(int,open(0).read().split())
if N >= K:
    print(int((X*K)+(Y*(N-K))))
else:
    print(int(X*N))

Buggy submission (verdict: Runtime Error):
N,K,X,Y = map(int,open(0).read().split())
print(X*K+Y(N-K))
Problem p04044 (python)

Fixed submission:
N,L,*S = map(str,open(0).read().split())
S.sort()
print("".join(S))

Buggy submission (verdict: Runtime Error):
N,L,*S = map(int,open(0).read().split())
S.sort()
print("".join(S))
Problem p02646 (python)

Fixed submission:
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t = int(input())
 
distance = abs(a-b)
sa = v - w
 
if distance <= t*sa:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t = int(input())

distance = abs(a-b)
sa = v - w

if sa == 0:
  print('NO')
elif distance % sa == 0 and distance =< t * sa:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t = int(input())

distance = abs(a-b)
sa = v - w

if distance % sa != 0:
  print('NO')
elif distance < t*sa:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t = int(input())

distance = abs(a-b)
sa = v - w
if distance%sa == 0 and distance < t*sa:
  print('YES')
else:
  print('NO')
Problem p02675 (python)

Fixed submission:
n = input()
m = int(n[-1])
if m == 3:
  print("bon")
elif m == 0 or m == 1 or m == 6 or m == 8:
  print("pon")
else:
  print("hon")

Buggy submission (verdict: Runtime Error):
n = int(input())
if n[-1] == 3:
  print("bon")
elif n[-1] == 0 or  n[-1] == 1 or  n[-1] == 6 or  n[-1] == 8:
  print("pon")
else:
  print("hon")
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
if t.startswith(s) and len(s) + 1 == len(t):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
if t.starttswith(s) and len(s) + 1 == len(t):
  print("Yes")
else:
  print("No")
Problem p02713 (python)

Fixed submission:
from math import gcd
k = int(input())
ans = 0
 
for s in range(1,k+1):
  for t in range(1,k+1):
    for u in range(1, k+1):
      ans += gcd(gcd(s,t),u)
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
k = int(input())
ans = 0

for s in range(1,k+1):
	for t in range(1,k+1):
  		for u in range(1, k+1):
			ans += gcd(gcd(s,t),u)
print(ans)
Problem p02741 (python)

Fixed submission:
list = [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]
K = int(input())
if K < 32:
    print(list[K-1])
else:
    print(list[31])

Buggy submission (verdict: Runtime Error):
list = [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]
K = int(input())
if K < 32:
    print(list[K+1])
else:
    print(list[33])

Buggy submission (verdict: Runtime Error):
K = int(input())
list = [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]
kou = list[K+1])
print(K+1,"番目の項は", kou, "です。")

Buggy submission (verdict: Runtime Error):
K = int(input())
list = [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(list[K])

Buggy submission (verdict: Runtime Error):
K = int(input())
list = [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(list[K+1])

Buggy submission (verdict: Runtime Error):
K = int(input())
list = [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]
F = K +1
print(list[F])

Buggy submission (verdict: Runtime Error):
K = int(input())
list = [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(list[K+1])

Buggy submission (verdict: Runtime Error):
K = int(input())
list = [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(list[K+1])

Buggy submission (verdict: Runtime Error):
K = input()
list = [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(list[K+1])

Buggy submission (verdict: Runtime Error):
K = input()
list = [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(list[K])
Problem p03644 (python)

Fixed submission:
n = int(input())

ans = 1
for i in range(1,10):
    if 2 ** i <= n:
        ans = 2**i

print(ans)

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

i = 1
for i in range(1,10):
  if 2 ** i <= N:
    ans = 2*i

print(ans)
Problem p02628 (python)

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
s=0
p.sort()
for i in range(k):
    s+=p[i]

print(s)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
s=0
sort(p)
for i in range(k):
    s+=p[i]

print(s)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
s=0
sort(p)
for i range k:
    s+=p[i]

print(s)

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

sort(p)
for i range k:
    s+=a[i]

print(s)
Problem p02724 (python)

Fixed submission:
X=int(input())
big_ple=X//500*1000
remain=X%500
small_ple=remain//5*5
Sum=big_ple+small_ple
 
if X<5:
    print(0)
elif X<500:
    print(small_ple)
else:
     print(Sum)

Buggy submission (verdict: Runtime Error):
big_ple=X//500*1000
remain=X%500
small_ple=remain//5*5
Sum=big_ple+small_ple

if X<5:
    print(0)
elif X<500:
    print(small_ple)
else:
     print(Sum)

Buggy submission (verdict: Runtime Error):
big_ple=X/500*1000
remain=X%500
small_ple=remain/5*5
Sum=big_ple+small_ple

if X<5:
    print(0)
elif X<500:
    print(small_ple)
else:
     print(Sum)