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

Fixed submission:
N, A, B, C = map(int, input().split())
L = [int(input()) for _ in range(N)]

ans = 10 ** 10

# 4bit search
for i in range(4**N):
    mask = i
    NowCost = 0
    Group0 = []
    Group1 = []
    Group2 = []
    NonGroup = []
    for j in range(N-1, -1, -1):
        if mask % 4 == 0:
            Group0.append(L[j])
            mask //= 4
        elif mask % 4 == 1:
            Group1.append(L[j])
            mask //= 4
        elif mask % 4 == 2:
            Group2.append(L[j])
            mask //= 4
        else:
            NonGroup.append(L[j])
            mask //= 4
    if len(Group0) == 0 or len(Group1) == 0 or len(Group2) == 0:
        continue
    NowCost += 10 * (len(Group0) - 1)
    LengthGroup0 = sum(Group0)
    NowCost += 10 * (len(Group1) - 1)
    LengthGroup1 = sum(Group1)
    NowCost += 10 * (len(Group2) - 1)
    LengthGroup2 = sum(Group2)
    NowCost += abs(A - LengthGroup0)
    NowCost += abs(B - LengthGroup1)
    NowCost += abs(C - LengthGroup2)
    ans = min(ans, NowCost)
print(ans)

Buggy submission (verdict: Runtime Error):
N, A, B, C = map(int, input().split())
L = [int(input()) for _ in range(N)]

INF = 10 ** 9

def dfs(cur, a, b, c):
    if cur == N:
        if min(a, b, c) > 0:
            return abs(a-A)+abs(b-B)+abs(c-C)-30
        else:
            return INF
    ret1 = dfs(cur+1, a, b, c)
    ret2 = dfs(cur+1, a+L[cur], b, c) + 10
    ret3 = dfs(cur+1, a, b+L[cur], c) + 10
    ret4 = dfs(cur+1, a, b, c+L[cur]) + 10
    return min(ret1 + ret2 + ret3 + ret4)

print(dfs(0,0,0,0))
Problem p03231 (python)

Fixed submission:
# AGC028
from fractions import gcd
#from math import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)

N, M = map(int, input().split())
S = input()
T = input()
l = lcm(N, M)
if S[0] != T[0]:
    print(-1)
    exit()
if N == 1 or M == 1:
    if N == 1:
        print(M)
    if M == 1:
        print(N)
    exit()

if N == l:
    tmp = N // M
    for i in range(tmp):
        if S[i * tmp] == T[i]:
            pass
        else:
            print(-1)
            exit()
if M == l:
    tmp = M // N
    for i in range(tmp):
        if T[i * tmp] == S[i]:
            pass
        else:
            print(-1)
            exit()

G = gcd(N, M)
if G != 1:
    for g in range(G):
        if S[g * N // G] == T[g * M // G]:
            pass
        else:
            print(-1)
            exit()
print(l)

Buggy submission (verdict: Runtime Error):
# AGC028
#from fractions import gcd
from math import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)

N, M = map(int, input().split())
S = input()
T = input()
l = lcm(N, M)

if N == 1 or M == 1:
    if N == 1:
        print(M)
    if M == 1:
        print(N)
    exit()

if N == l:
    tmp = N // M
    for i in range(tmp):
        if S[i * tmp] == T[i]:
            pass
        else:
            print(-1)
            exit()
if M == l:
    tmp = M // N
    for i in range(tmp):
        if T[i * tmp] == S[i]:
            pass
        else:
            print(-1)
            exit()

G = gcd(N, M)
if G != 1:
    for g in range(G):
        if S[g * N // G] == T[g * M // G]:
            pass
        else:
            print(-1)
            exit()
print(l)
Problem p03309 (python)

Fixed submission:
# ABC102-C
import numpy as np
import statistics
import collections
N = int(input())
A = list(map(int, input().split()))
B = np.array(range(1, N+1))
A = np.array(A)
C = A - B
b = np.median(C)
print(int(np.sum(abs(C - b))))

Buggy submission (verdict: Runtime Error):
# ABC102-C
import numpy as np
import statistics
N = int(input())
A = list(map(int, input().split()))
B = np.array(range(1, N+1))
A = np.array(A)
C = abs(A - B)
b = int(round(statistics.mode(C)))
print(sum(abs(C - b)))
Problem p03351 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
if d >= abs(c-a):
    ans = "Yes"
else:
    if d >= abs(b-a) and d >= abs(c-b):
        ans = "Yes"
    else:
        ans = "No"
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
lst = [a, b, c].sort()
a = lst[0]
b = lst[1]
v = lst[2]
if d > abs(a-b) and d > abs(c - b):
    print("No")
else:
    print("Yes")
Problem p03352 (python)

Fixed submission:
# ABC097-B
ans_list = [1]
for i in range(2, 10):
    ans_list.append(2 ** i)
for i in range(2, 7):
    ans_list.append(3 ** i)
for i in range(2, 5):
    ans_list.append(5 ** i)    
for i in range(2, 4):
    ans_list.append(6 ** i)
    ans_list.append(7 ** i)
    ans_list.append(10 ** i)
num = [11,12, 13, 14, 15, 17, 18, 19, 20, 21, 22,  23,24, 25, 26, 27, 28,  29, 30,  31]
for i in num:
    ans_list.append(i ** 2)
X = int(input())
for i in range(X, 0, -1):
    if i in ans_list:
        ans = i
        break
print(ans)

Buggy submission (verdict: Runtime Error):
ans_list = []
for i in range(2, 10):
    ans_list.append(2 ** i)
for i in range(2, 7):
    ans_list.append(3 ** i)
for i in range(2, 5):
    ans_list.append(5 ** i)
for i in range(2, 4):
    ans_list.append(7 ** i)
num = [11, 13, 17, 19, 23, 29, 31]
for i in num:
    ans_list.append(i ** 2)
X = int(input())
for i in range(X, 0, -1):
    if i in ans_list:
        ans = i
        break
print(ans)
Problem p03363 (python)

Fixed submission:
# AGC023
import collections
N = int(input())
A = list(map(int, input().split()))
ans = 0
S = [0] * (N+1)
for i in range(N):
    S[i+1] = S[i] + A[i]
c = collections.Counter(S)
c = c.most_common()
for i in range(len(c)):
    tmp = c[i][1]
    if tmp == 1:
        pass
    else:
        ans += tmp*(tmp-1) // 2
print(int(ans))

Buggy submission (verdict: Runtime Error):
# AGC023
import collections
from scipy.special import comb
N = int(input())
A = list(map(int, input().split()))
ans = 0
S = [0] * (N+1)
for i in range(N):
    S[i+1] = S[i] + A[i]
c = collections.Counter(S)
c = c.most_common()
for i in range(len(c)):
    if c[i][1] == 1:
        pass
    if c[i][1] == 2:
        ans += 1
    else:
        ans += comb(c[i][1], 2)
print(int(ans))
Problem p03408 (python)

Fixed submission:
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]
s_set = list(set(s))
t_set = list(set(t))
check_list = []
for i in s_set:
    check_list.append(s.count(i) - t.count(i))
print(max(max(check_list), 0))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]
s_set = list(set(s))
t_set = list(set(t))
check_list = []
for i in s_set:
    check_list.append(s.count(i) - t.count(i))
print(max(max(check_list), 0)
Problem p03417 (python)

Fixed submission:
N, M = map(int , input().split())
if N == 1 and M == 1:
    print(1)
elif N == 1 and M == 2:
    print(0)
elif N == 2 and M == 1:
    print(0)
elif N == 1 or M == 1:
    print(N*M - 2)
else:
    print((N-2) * (M-2))

Buggy submission (verdict: Runtime Error):
N, M = map(int , input().split())
if N == 1 and M == 1:
    print(1)
elif N == 1 and M == 2:
    print(0)
elif N == 2 and M == 1:
    print(0)
elif N == 1 or M == 1:
    print(NM - 2)
else:
    print((N-2) * (M-2))
Problem p03474 (python)

Fixed submission:
# ABC084-B
A, B = map(int, input().split())
S = input()
ans = 'No'
flag = True
num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
if S[A] == '-':
    aa = S[0:A]
    bb = S[A+1:A+B+1]
    for i in range(len(aa)):
        if aa[i] not in num:
            flag  = False
    for k in range(len(bb)):
        if bb[k] not in num:
            flag = False
    if flag:
        ans = 'Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
# ABC084-B
A, B = map(int, input().split())
S = input()
ans = 'No'
flag = True
num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
if S[A] == '-':
    aa = S[0:A]
    bb = S[A+1:A+B+1]
    for i in range(len(aa)):
        if aa[i] not in num:
            flag  = False
    for k in range(len(bb)):
        if bb[i] not in num:
            flag = False
    if flag:
        ans = 'Yes'
print(ans)
Problem p03557 (python)

Fixed submission:
import bisect
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort()
C.sort()
ans = 0
for b in B:
    a_max = bisect.bisect_left(A, b)
    c_min = bisect.bisect_right(C, b)
    ans += a_max * (N - c_min)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort()
C.sort()
ans = 0
for b in B:
    a_max = bisect.bisect_left(A, b)
    c_min = bisect.bisect_right(C, b)
    ans += a_max * (N - c_min)
print(ans)
Problem p03565 (python)

Fixed submission:
# ABC076C
S = input()
T = input()
check = -1
for i in range(len(S) - len(T) + 1):
    if S[i] == "?" or S[i] == T[0]:
        k = 1
        flag = True
        while k < len(T):
            if S[i+k] == "?":
                k += 1
            else:
                if S[i + k] == T[k]:
                    k += 1
                else:
                    flag = False
                    break
        if k == len(T) and flag == True:
            check = i

if check != -1:
    S = list(S)
    for i in range(len(T)):
        S[check + i] = T[i]
    S = "".join(S)
    ans = S.replace("?", "a")
    print(ans)
else:
    print("UNRESTORABLE")

Buggy submission (verdict: Runtime Error):
# ABC076C
S = input()
T = input()

for i in range(len(S) - len(T) + 1):
    if S[i] == "?" or S[i] == T[0]:
        k = 1
        flag = True
        while k < len(T):
            if S[i+k] == "?":
                k += 1
            else:
                if S[i + k] == T[k]:
                    k += 1
                else:
                    flag = False
                    break
        if k == len(T) and flag == True:
            check = i

if check != -1:
    S = list(S)
    for i in range(len(T)):
        S[check + i] = T[i]
    S = "".join(S)
    ans = S.replace("?", "a")
    print(ans)
else:
    print("UNRESTORABLE")

Buggy submission (verdict: Runtime Error):
# ABC076C
S = input()
T = input()
check = -1
flag = True
for i in range(len(S)):
    flag = True
    if S[i] != T[0]:
        continue
    k = 1
    while k < len(T):
        if S[i+k] == "?":
            k += 1
        else:
            if S[i+k] == T[k]:
                k += 1
            else:
                flag = False
                break        
    if k == len(T) and flag == True:
        check = i

if check != -1:
    S = list(S)
    for i in range(len(T)):
        S[check + i] = T[i]
    S = "".join(S)
    ans = S.replace("?", "a")
    print(ans)
else:
    print("UNRESTORABLE")
Problem p03611 (python)

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

cnt = [0] * 1000010
for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i-1] += 1

print(max(cnt))

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

cnt = [0] * 100000
for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i-1] += 1

print(max(cnt))
Problem p03623 (python)

Fixed submission:
# ABC071-A
x, a, b = map(int, input().split())
if abs(x-a) > abs(x-b):
    print('B')
else:
    print('A')

Buggy submission (verdict: Runtime Error):
# ABC071-C　
N = int(input())
A_list = list(map(int, input().split()))

A_set = set(A_list)
A_set = sorted(A_set, reverse=True)

side_list = [0, 0]

for i in range(len(A_set)):   # 大きい順に取っていき，リストで個数を確認する
    if len(side_list) >= 4:
        break
    count = A_list.count(A_set[i])    # リストの個数を確認
    if count == 2 or count == 3:
        side_list.append(A_set[i])
    if count >= 4:
        side_list.append(A_set[i])
        side_list.append(A_set[i])
        
side_list.sort(reverse = True)
print(side_list[0] * side_list[1])
Problem p03625 (python)

Fixed submission:
# ABC071-C
N = int(input())
A = sorted(list(map(int, input().split())), reverse = True)

for i in range(N-1):
    if A[i] == A[i+1]:
        A[i+1] = 0
    elif A[i] != A[i+1]:
        A[i] = 0
A.sort(reverse = True)
print(A[0] * A[1])

Buggy submission (verdict: Runtime Error):
# ABC071-C
import collections
N = int(input())
A_list = sorted(list(map(int, input().split())), reverse = True)
A_set = set(A_list)
A_set = sorted(A_set, reverse=True)
ans_list = [0]   
ans_rectangle_list = []   # 長方形を作る辺を入れる
rec_counter = 0   # 大きい辺を入れる回数，二回入れば良い
for i in range(len(A_set)):   # 大きい順に取っていき，リストで個数を確認する
    if rec_counter == 2:
        break
    count = A_list.count(A_set[i])    # リストの個数を確認
    if count  == 2 or count == 3:   # 対辺を作れる時
        ans_rectangle_list.append(A_set[i])
        rec_counter += 1
    elif count >= 4:   # 4辺全てを作れる
        ans_list.append(A_set[i] ** 2)

if rec_counter == 2:
    rec_ans = ans_rectangle_list[0] * ans_rectangle_list[1]
if len(ans_list) == 0 and len(ans_rectangle_list) <= 1:
    print(0)
else:
    if max(ans_list) > rec_ans:
        print(max(ans_list))
    elif max(ans_list) <= rec_ans:
        print(rec_ans)
Problem p03633 (python)

Fixed submission:
# ABC070-C
import fractions
from functools import reduce
N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def lcm_base(x, y):
    return (x * y ) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers)
print(lcm_list(T))

Buggy submission (verdict: Runtime Error):
# ABC070-C
import math
from functools import reduce
N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def lcm_base(x, y):
    return (x * y ) // math.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers)
print(lcm_list(T))
Problem p03681 (python)

Fixed submission:
from scipy.misc import comb
import math
mod = 10**9 + 7

N, M = map(int, input().split())
if abs(N - M) > 1:
    print(0)
else:
    if abs(N - M) == 1:
        print(((math.factorial(N) % mod) * (math.factorial(M) % mod)) % mod)
    else:
        print(((math.factorial(N) % mod) * ((math.factorial(M) * 2) % mod)) % mod)

Buggy submission (verdict: Runtime Error):
from scipy.special import comb
import math
mod = 10**9 + 7

N, M = map(int, input().split())
if abs(N - M) > 1:
    print(0)
else:
    if abs(N - M) == 1:
        print(((math.factorial(N) % mod) * (math.factorial(M) % mod)) % mod)
    else:
        print(((math.factorial(N) % mod) * ((math.factorial(M) * 2) % mod)) % mod)
Problem p03693 (python)

Fixed submission:
# A
r, g, b = map(int, input().split())
N = 10 * g + b 
if N % 4 == 0:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
v# A
r, g, b = map(int, input().split())
N = 10 * g + b 
if N % 4 == 0:
    print('YES')
else:
    print('NO')
Problem p03739 (python)

Fixed submission:
import numpy as np
N = int(input())
A = list(map(int, input().split()))

res_plus = np.cumsum(A)
res_minus = np.cumsum(A)
ans_plus = 0
ans_minus = 0

tmp_tmp = 0
# 奇数項を正とする
for i in range(N):
    res_plus[i] += tmp_tmp
    if i % 2 == 0:         # 奇数項   
        if res_plus[i] > 0:
            pass
        else:
            tmp = 1 - res_plus[i]
            ans_plus += tmp
            tmp_tmp += tmp
    else:                  # 偶数項
        if res_plus[i] < 0:
            pass
        else:
            tmp = res_plus[i] + 1
            ans_plus += tmp
            tmp_tmp -= tmp


tmp_tmp = 0
# 奇数項を負とする
for i in range(N):
    res_minus[i] += tmp_tmp
    if i % 2 == 0:      # 奇数項
        if res_minus[i] < 0:
            pass
        else:
            tmp = res_minus[i] + 1
            ans_minus += tmp
            tmp_tmp -= tmp
    else:               # 偶数項
        if res_minus[i] > 0:
            pass
        else:
            tmp = 1 - res_minus[i]
            ans_minus += tmp
            tmp_tmp += tmp

##print(ans_minus, ans_plus)
print(min(ans_plus, ans_minus))

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
A = list(map(int, input().split()))

res_plus = np.cumsum(A)
res_minus = np.cumsum(A)
ans_plus = 0
ans_minus = 0

tmp_tmp = 0
# 奇数項を正とする
for i in range(N):
    res_plus[i] += tmp_tmp
    if i % 2 == 0:         # 奇数項   
        if res_plus[i] > 0:
            pass
        else:
            tmp = 1 - res_plus[i]
            ans_plus += tmp
            tmp_tmp += tmp
    else:                  # 偶数項
        if res_plus[i] < 0:
            pass
        else:
            tmp = res_plus[i] + 1
            ans_plus += tmp
            tmp_tmp -= tmp


tmp_tmp = 0
# 奇数項を負とする
for i in range(N):
    res_minus[i] += tmp_tmp
    if i % 2 == 0:      # 奇数項
        if res_minus[i] < 0:
            pass
        else:
            tmp = res_minus[i] + 1
            ans_minus += tmp
            tmp_tmp -= tmp
    else:               # 偶数項
        if res_minus[i] > 0:
            pass
        else:
            tmp = 1 - res_minus[i]
            ans_minus += tmp
            tmp_tmp += tmp

##print(ans_minus, ans_plus)
print(min(ans_plus, ans_minus))
Problem p03777 (python)

Fixed submission:
# A問題
a, b = map(str, input().split())
if a == "H":
    if b == "H":
        print("H")
    else:
        print("D")
else:
    if b == "H":
        print("D")
    else:
        print("H")

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;

int main(){
    char a, b;
    cin >> a >> b;
    bool flag = false;
    if (a == 'H' && b == 'H'){
        flag = true;
    }
    if (a == 'D' && b == 'D'){
        flag = true;
    }
    if (flag){
        cout << 'H' << endl;
    }else{
        cout << 'D' << endl;
    }
    
}
Problem p03962 (python)

Fixed submission:
# A problem
a, b, c = map(int, input().split())
print(len(set([a, b, c])))

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
int main(){
    int a, b, c;
    cin >> a >> b >> c;
    set<int> st{a, b, c};
    cout << st.size() << endl;
}
Problem p04045 (python)

Fixed submission:
#C問題
N, K = map(int, input().split())
D = list(map(str, input().split()))

def check(n, d):
    n = str(n)
    for nstr in n:
        if nstr in d:
            return False
    return True
while True:
    if check(N, D):
        print(N)
        break
    else:
        N += 1

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

D = []
D = list(map(int, input().split()))

num = []
for i in range(10):
    if i not in D:
        num.append(i)

N_num = []
while True:
    if N ==0:
        break
    N_num.append(N%10)
    N = N//10

N_num.sort(reverse = True)

ans = []
for i in N_num:
    for k in range(len(num)):
        if num[k] >= i:
            ans.append(num[k])
            break
        elif k == len(num):
            ans.append(k)
            ans[k-1] = num[k+1]
map(str, ans)
ans = int("".join(map(str, ans)))
print(ans)

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

D = []
D = list(map(int, input().split()))

num = []
for i in range(10):
    if i not in D:
        num.append(i)

N_num = []
while True:
    if N ==0:
        break
    N_num.append(N%10)
    N = N//10

N_num.sort(reverse = True)

ans = []
for i in N_num:
    for k in num:
        if k >= i:
            ans.append(k)
            break
map(str, ans)
ans = int("".join(map(str, ans)))
print(ans)
Problem p02743 (python)

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

if c - a - b >= 0 and (c - a - b)**2 > 4 * a * b:
    print('Yes')
else:
    print('No')

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

if a**0.5 + b**0.5 < c**0.5:
    print('Yes')
else:
    print('No')
Problem p02730 (python)

Fixed submission:
s=str(input())
def isPalin(l,r):
  if l >= r:
    return True
  if s[l]!=s[r]:
    return False
  return isPalin(l+1,r-1)
n = len(s)
if isPalin(0,n-1) and isPalin(0,n//2-1) and isPalin(n//2+1,n-1):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s=str(input())
def isPalin(l,r):
  if l >= r:
    return True
  if s[l]!=s[r]:
    return False:
  return isPalin(l+1,r-1)
n = len(s)
if isPalin(0,n-1) and isPalin(0,n//2-1) and isPalin(n//2+1,n-1):
  print('Yes')
else:
  print('No')
Problem p02741 (python)

Fixed submission:
k = int(input())
x = [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(x[k-1])

Buggy submission (verdict: Runtime Error):
import math
a,b,c=map(int,input().split())
eps = 0.00000000000001
if 4*a*b<(c-a-b)**2 and (c-a-b) > 0:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
import math
a,b,c=map(int,input().split())
eps = 0.0000001
if math.sqrt(a)+math.sqrt(b)+eps<math.sqrt(c):
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
import math
a,b,c=map(int,input().split())
if math.sqrt(a)+math.sqrt(b)+10**(-7)<math.sqrt(c):
	print('Yes')
else:
	print('No')
Problem p02742 (python)

Fixed submission:
h,w=map(int,input().split())
if(h==1 or w==1):
  print(1)
else:
  print(((w+1)//2)*((h+1)//2)+(w//2)*(h//2))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
if(h==1||w==1):
  print(1)
else:
  print(((w+1)//2)*((h+1)//2)+(w//2)*(h//2))
Problem p02743 (python)

Fixed submission:
import math
a,b,c=map(int,input().split())
eps = 0.00000000000001
if 4*a*b<(c-a-b)**2 and (c-a-b)>0:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
import math
a,b,c=map(int,input().split())
if a+b+2*math.sqrt(a)*math.sqrt(b)<c:
	print('Yes')
  else:
    print('No')
Problem p03671 (python)

Fixed submission:
a=list(map(int,input().split()))
a.sort()
print(a[0]+a[1])

Buggy submission (verdict: Runtime Error):
input()
a=map(int,input().split())
a.sort()
print(a[0]+a[1])

Buggy submission (verdict: Runtime Error):
a=map(int,input().split())
a.sort()
print(a[0]+a[1])
Problem p03672 (python)

Fixed submission:
def f(x):
    return len(x) % 2 == 0 and x[:len(x)//2] == x[len(x)//2:]
 
x=input()[:-1]
while not f(x):
    x=x[:-1]
 
print(len(x))

Buggy submission (verdict: Runtime Error):
def f(x):
    return len(x) % 2 == 0 and x[:len(x)/2] == x[len(x)/2:]

x=input()
while not f(x):
    x=x[:-1]

print(len(x))

Buggy submission (verdict: Runtime Error):
def f(x):
    return len(x) % 2 == 0 and x[:len(x)/2] == x[len(x)/2:]
x=input()
while f(x):
    x=x[:-1]
print(len(x))
Problem p02741 (python)

Fixed submission:
my_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]
N = input()
N = int(N)
print(my_list[N-1])

Buggy submission (verdict: Runtime Error):
import math
a, b = map(int,input().split())
min = math.floor(a / 0.08)
max = math.ceil((a+1)/0.08)
ans = 0
for i in range(min, max):
    if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
        ans = i
        break
if ans == 0:
    print("-1")
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
import math

def A():
    a=int(input())
    b=int(input())
    c=int(input())
    A=math.sqrt(a)
    B=math.sqrt(b)
    C=math.sqrt(c)
    if A+B<C:
        print("Yes")
    else:
        print("No")

if __name__=='__main__':
    A()

Buggy submission (verdict: Runtime Error):
import math

def A():
    a=int(input())
    b=int(input())
    c=int(input())
    A=math.sqrt(a)
    B=math.sqrt(b)
    C=math.sqrt(c)
    if A+B<C:
        print("Yes")
    else:
        print("No")

if __init__=='__main__':
    A()

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

Buggy submission (verdict: Runtime Error):
my_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]
N = input()
N = int(N)
print(my_list[N])

Buggy submission (verdict: Runtime Error):
my_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]
N = input()
N = int(N)
print(my_list[N])

Buggy submission (verdict: Runtime Error):
my_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]
N = input()
N = int(N)
print(my_list[N])