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

Fixed submission:
import numpy as np

def do():
    data = np.array(input().split(" "), dtype="int64")
    life = np.array(input().split(" "), dtype="int64")
    monsters = data[0]
    smash = data[1]
    if smash == 0:
        print(np.sum(life))
    elif smash >= monsters:
        print(0)
    else:
        a = np.sort(life)[-smash]
        leftover = np.where(life < a, life, 0)
        print(np.sum(leftover))

do()

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

@jit
def do():
    data = np.array(input().split(" "), dtype="int64")
    life = np.array(input().split(" "), dtype="int64")
    monsters = data[0]
    smash = data[1]
    if smash == 0:
        print(np.sum(life))
    elif smash >= monsters:
        print(0)
    else:
        a = np.sort(life)[-smash]
        leftover = np.where(life < a, life, 0)
        print(np.sum(leftover))

do()

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

@jit
def do():
    data = np.array(input().split(" "), dtype="int64")
    life = np.array(input().split(" "), dtype="int64")
    monsters = data[0]
    smash = data[1]
    if smash == 0:
        print(np.sum(life))
    elif smash >= monsters:
        print(0)
    else:
        a = np.sort(life)[-smash]
        leftover = np.where(life < a, life, 0)
        print(np.sum(leftover))

do()

Buggy submission (verdict: Runtime Error):
import numpy as np
from numba import jit
  
data = np.array(input().split(" "), dtype="int")
life = np.array(input().split(" "), dtype="int")
@jit
def calculation(data, life):
    monsters = data[0]
    smash = data[1]
    a = np.sort(life)
    if smash >= len(a):
        print(0)
    elif smash == 0:
        print(np.sum(a))
    else:
        leftover = np.where(a[-smash] > a, a, 0)
        print(np.sum(leftover))

calculation(data, life)

Buggy submission (verdict: Runtime Error):
import numpy as np
from numba import jit
  
data = np.array(input().split(" "), dtype="int")
life = np.array(input().split(" "), dtype="int")
@jit
def calculation(data, life):
    monsters = data[0]
    smash = data[1]
    a = np.sort(life)
    leftover = np.where(a[-smash] > a, a, 0)
    print(np.sum(leftover))

calculation(data, life)
Problem p02570 (python)

Fixed submission:
D, T, S = map(int, input().split())

if S*T >= D:
  print("Yes")
else:
  print("No")

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

if S*T >= D:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
D, T, S = map(int, input(),split)

if S*T >= D:
  print("Yes")
else:
  print("No")
Problem p02570 (python)

Fixed submission:
d,t,s = map(int,input().split())
if s*t >= d:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
d,t,s = map(int,input().split())

print("Yes" if s*t >= d else "No)
Problem p02570 (python)

Fixed submission:
a,b,c = (int(x) for x in input().split())

if a > b * c:
  print("No")
  
else:
  print("Yes")

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

if D > S * T:
  print("no")
  
else:
  print("yes")
Problem p02594 (python)

Fixed submission:
# 入力
X = input()

# 以下に回答を記入
X = int(X)

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):
# 入力
X = input()

# 以下に回答を記入
if X >= 30:
    print('Yes')
else:
    print('No')
Problem p03242 (python)

Fixed submission:
n = int(input())

lst = []
res = []

while n > 0:
    lst.append(n%10)
    n //= 10
    
lst.reverse()


for i in lst:
    if i == 1:
        res.append(9)
    elif i == 9:
        res.append(1)
    else:
        res.append(i)


S = ""

for j in res:
    S += str(j)

print(S)

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

lst = []
res = []

while n > 0:
    lst.append(n%10)
    n //= 10
lst.reverse()

for i in lst:
    if i == 1:
        res.append(9)
    elif i == 9:
        res.append(1)
    else:
        res.append(i)

S = ""

for j in res:
    Str += str(j)

print(S)

Buggy submission (verdict: Runtime Error):

n = input()

lst = []
res = []

while n > 0:
    lst.append(n%10)
    n //= 10
lst.reverse()

for i in lst:
    if i == 1:
        res.append(9)
    elif i == 9:
        res.append(1)
    else:
        res.append(i)

Str = ""

for j in res:
    Str += str(j)

print(Str)
Problem p02659 (python)

Fixed submission:
from decimal import Decimal

A,B = input().split()
A = int(A)
B = int(Decimal(B) * 100)

s = A * B
s = s // 100
print(int(s))

Buggy submission (verdict: Runtime Error):
A,B = input().split()
A = int(A)
B = float(B*100)

s = A * B
s = s // 100
print(int(s))
Problem p02699 (python)

Fixed submission:
S,W = map(int,input().split())

if (S <= W) :
    print("unsafe")
else :
    print("safe")

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

if (S <= W) :
    print("unsafe")
else :
    print("safe")
Problem p03127 (python)

Fixed submission:
import fractions

N =int(input())
lives = [int(i) for i in input().split()]
gcd_value = lives[0]

for i in range(1,len(lives)) :
    gcd_value = fractions.gcd(gcd_value, lives[i])

print(gcd_value)

Buggy submission (verdict: Runtime Error):
import math

N =int(input())
lives = [int(i) for i in input().split()]
gcd_value = lives[0]

for i in range(1,len(lives)) :
    gcd_value = math.gcd(gcd_value, lives[i])

print(gcd_value)

Buggy submission (verdict: Runtime Error):
import math

N =int(input())
lives = [int(i) for i in input().split()]
gcd_value = lives[0]

for i in range(1,len(lives)) :
    gcd_value = math.gcd(gcd_value, lives[i])

print(gcd_value)
Problem p03208 (python)

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

trees = []
for i in range(N) :
	trees.append(int(input()))

trees.sort()
min_diff = 99999999999
for i in range(N-K+1) :
	max_v = trees[i+K-1]
	min_v = trees[i]
	diff = max_v - min_v
	if (min_diff > diff) :
		min_diff = diff
	if (min_diff == 0) :
		break



print(min_diff)

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

trees = []
for i in range(N) :
	trees.append(int(input()))

trees.sort()
min_diff = 99999999999
a,b,c = trees[0:K]
for i in range(N-K+1) :
	max_v = c
	min_v = a
	diff = max_v - min_v
	if (min_diff > diff) :
		min_diff = diff
	if (min_diff == 0) :
		break

	a,b,c = b,c,trees[i+K]


print(min_diff)

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

trees = []
for i in range(N) :
	trees.append(int(input()))

trees.sort()
min_diff = 999999
for i in range(N-K+1) :
	arr = trees[i:i+K]
	max_v = max(arr)
	min_v = min(arr)
	diff = max_v - min_v
	if (min_diff > diff) :
		min_diff = diff
	if (min_diff = 0) :
		break


print(min_diff)
Problem p02622 (python)

Fixed submission:
S = input()
T = input()
count = 0
j =0
for i in S:
  if i != T[j]:
    count +=1
  j+=1

print(count)

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

j =0
for i in S:
  if i != T[j]:
    count +=1
  j+=1

print(count)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
 
count = 0
for i in S:
  if S[i] != T[i]:
    count +=1
 
print(count)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
 
count = 0
for i in range(S):
  if S[i] != T[i]:
    count +=1

print(count)

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

for i in range(S):
  if S[i] != T[i]:
    T[i] = S[i]

print(S)
print(T)
Problem p02627 (python)

Fixed submission:
s = input()
if s.isupper():
  print("A")
else:
  print("a")

Buggy submission (verdict: Runtime Error):
IN = input()
if str.isupper(IN):
  return "A"
else:
  return "a"

Buggy submission (verdict: Runtime Error):
IN = input()
if IN.str.isupper():
  return "A"
else:
  return "a"
Problem p02570 (python)

Fixed submission:
D, T, S = map(int, input().split())
if S * T >= D:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

N, M = map(int, input().split())
friend_info = [list(map(int, input().split())) for _ in range(M)]

relation_dict = {}
for person1, person2 in friend_info:
    add_flag = False
    for k, v in relation_dict.items():
        if((person1 in v) or (person2 in v)):
            relation_dict[k].add(person1)
            relation_dict[k].add(person2)
            add_flag = True
            break
    if(add_flag == False):
        new_key = str(len(relation_dict)+1)
        relation_dict[new_key] = {person1, person2}

max_group = max([len(relation) for relation in relation_dict.values()])

print(max_group)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

N, M = map(int, input().split())
friend_info = [list(map(int, input().split())) for _ in range(M)]

relation_dict = {}
for person1, person2 in friend_info:
    add_flag = False
    for k, v in relation_dict.items():
        if((person1 in v) or (person2 in v)):
            relation_dict[k].add(person1)
            relation_dict[k].add(person2)
            add_flag = True
            break
    if(add_flag == False):
        new_key = str(len(relation_dict)+1)
        relation_dict[new_key] = {person1, person2}

max_group = max([len(relation) for relation in relation_dict.values()])
print(max_group)

Buggy submission (verdict: Runtime Error):
long_str = input()
short_str = input()
short_list = list(short_str)
 
long_len = len(long_str)
short_len = len(short_str)
iter_num = long_len - short_len + 1
 
max_count = 0
for i in range(iter_num):
  tmp = 0
  obj_list = list(long_str[i:(short_len+i)])
  for s, o in zip(short_list, obj_list):
    tmp += int(s == o)
  max_count = max(max_count, tmp)

print(short_len - max_count)
Problem p03776 (python)

Fixed submission:
import math
def pcount(n, r):
    return math.factorial(n) // (math.factorial(r)* math.factorial(n - r))

n, a, b = map(int, input().split())
L = [int(i) for i in input().split()]
L.sort(reverse=True)

T = L[:a]
print(sum(T)/a)

s = 0
Tmin = min(T)
countTminT = T.count(Tmin)
countTminL = L.count(Tmin)

if a == 1 and countTminL == 1:
  s = 1
elif countTminT == a:
  for i in range(a,b+1):
    if countTminL+1 == i:
      break
    s += pcount(countTminL, i)
else:
  s += pcount(countTminL, countTminT)

print(s)

Buggy submission (verdict: Runtime Error):
import math
def pcount(n, r):
    return math.factorial(n) // (math.factorial(r)* math.factorial(n - r))

n, a, b = map(int, input().split())
L = [int(i) for i in input().split()]
L.sort(reverse=True)

T = L[:a]
print(sum(T)/a)

s = 0
Tmin = min(T)
countTminT = T.count(Tmin)
countTminL = L.count(Tmin)

if a == 1 and countTminL == 1:
  s = 1
elif countTminT == a:
  for i in range(a,b+1):
    s += pcount(countTminL, i)
else:
  s += pcount(countTminL, countTminT)

print(s)
Problem p02577 (python)

Fixed submission:
s=int(input())
if s%9==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
 v = input()
 if v % 9 == 0
     print('Yes')
 else:
     print('No')
Problem p02793 (python)

Fixed submission:
import fractions
from functools import reduce

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

def lcm_ls(num):
    return reduce(lcm, num, 1)


n = int(input())
ls = list(map(int, input().split()))

m = lcm_ls(ls)

ans = 0

for i in range(n):
    ans += m // ls[i]

print(ans % (10 ** 9 + 7))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

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

def lcm_ls(num):
    return reduce(lcm, num, 1)


n = int(input())
ls = list(map(int, input().split()))

m = lcm_ls(ls)

ans = 0

for i in range(n):
    ans += m // ls[i]

print(ans % (10 ** 9 + 7))
Problem p02860 (python)

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

if n % 2 != 0:
    print("No")
else:
    s_1 = s[:int(n/2)]
    s_2 = s[int(n/2):]
    if (s_1 == s_2):
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
if n % 2 != 0:
    print("No")
else:
    s_1 = s[:int(n/2)]
    s_2 = s[int(n/2):]
    if s_1 == s_2:
        print("Yes")
    else:
        print("No")
Problem p03013 (python)

Fixed submission:
n, m = map(int, input().split())
ls = [int(input()) for _ in range(m)]

dp = [0] * (n + 1)
dp[0] = 1

ls.append(0)

if ls[0] == 1:
	dp[1] = 0
	del ls[0]
else:
	dp[1] = 1

for i in range(2, n + 1):
	if i == ls[0]:
		dp[i] == 0
		del ls[0]
	else:
		dp[i] = dp[i - 1] + dp[i - 2]

print(dp[n] % 1000000007)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
ls = [int(input()) for _ in range(m)]

dp = [0] * (n + 1)
dp[0] = 1

if ls[0] == 1:
	dp[1] = 0
	del ls[0]
else:
	dp[1] = 1

ls.append(0)

for i in range(2, n + 1):
	if i == ls[0]:
		dp[i] == 0
		del ls[0]
	else:
		dp[i] = dp[i - 1] + dp[i - 2]
		
print(dp[n] % 1000000007)
Problem p02570 (python)

Fixed submission:
d, t, s = map(int, input().split())
if s*t >= d:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S, T = input(), input()
ans = len(T)
for i in range(len(S)-len(T)+1):
    tmp = 0
    for j in range(len(T)):
        if S[i+j] != T[j]:
            tmp += 1
    ans = min(ans, tmp)
print(ans)
Problem p02695 (python)

Fixed submission:
from collections import deque


# 数列の点数を計算する関数
def calc(seq):
    score = 0
    for a, b, c, d in req:
        if seq[b - 1] - seq[a - 1] == c:
            score += d

    return score


n, m, q = list(map(int, input().split()))
req = [list(map(int, input().split())) for _ in range(q)]

ans = 0

que = deque()

# 数列の1番目、[1]～[m]までキューに追加しますが、
# 実は、この問題は数列の最初が[1]の場合だけを考えても解けます。
for i in range(1, m + 1):
    que.append([i])

while que:
    seq = que.popleft()

    if len(seq) == n:
        # 長さがnになったので、得点を計算します
        score = calc(seq)
        ans = max(ans, score)
    else:
        # 次に追加する数字は、下限が今の数列の一番後ろの数字、上限がmです
        for i in range(seq[-1], m + 1):
            seq_next = seq + [i]
            que.append(seq_next)

print(ans)

Buggy submission (verdict: Runtime Error):
def resolve():
	from collections import deque
	N, M, Q = map(int, input().split())
	A = [list(map(int, input().split())) for i in range(Q)]
	
	def calc(x): # type(x) == str型
		ans = 0
		for i in A:
			a, b, c, d = i[0], i[1], i[2], i[3]
			if int(s[b-1]) - int(s[a-1]) == c:
				ans += d
		return ans
		
	q = deque([1])
	ans = 0
	while q:
		tmp = q.popleft()
		if len(tmp) == N:
			ans = max(ans, calc(tmp))
		else:
			for i in range(int(tmp[-1]), M+1):
				q.append(tmp+str(i))

	print(ans)
	
resolve()
Problem p02711 (python)

Fixed submission:
n = input()
if "7" in str(n):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(1, n):
    if 0 != i%3 and 0 != i%5:
        ans += i
print(ans)
Problem p02712 (python)

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

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

Buggy submission (verdict: Runtime Error):
for i in range(1, n+1):
    if 0 != i%3 and 0 != i%5:
        ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(1, n):
    if 0 != i%3 and 0 != i%5:
        ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(1, n):
    if 0 != i%3 and 0 != i%5:
        ans += i
print(ans)
Problem p02771 (python)

Fixed submission:
a = {int(i) for i in input().split()}
if len(a) == 2:
    print("Yes")
else:
    print("No")

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

l = [s.count(i) for i in s]
d = {i:j for i,j in zip(s, l)}
m = max(l)

d = {i:j for i, j in zip(s, l)}
ans = [i for i in d if d[i] == m]
sorted(ans)

for i in ans:
    print(i)
Problem p02773 (python)

Fixed submission:
from collections import Counter

n = int(input())
s = [input() for i in range(n)]

d = Counter(s)
m = max(d.values())
ans = [i for i in d if d[i] == m]
ans = sorted(ans)

for i in ans:
    print(i)

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

l = [s.count(i) for i in s]
d = {i:j for i,j in zip(s, l)}
m = max(l)

d = {i:j for i, j in zip(s, l)}
ans = [i for i in d if d[i] == m]
sorted(ans)

for i in ans:
    print(i)
Problem p02659 (python)

Fixed submission:
#C
A,B = input().split()
A = int(A)
B = round(float(B)*100)
 
res = (A*B)//100
print(res)

Buggy submission (verdict: Runtime Error):
#C
A,B = map(int,input().split())
C = str(A*B)
print(C.split('.')[0])
Problem p02693 (python)

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

if(A%K==0 or B%K==0):
    print('OK')
elif(B-A >= K - A%K):
    print('OK')
else:
    print('NG')

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

if(A%K==0 or B%K==0 or (B-A>=K and B!=A):
    print('OK')
else:
    print('NG')

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

if(A%K==0 and B%K==0 and B-A=>K):
    print('OK')
else:
    print('NG')
Problem p02779 (python)

Fixed submission:
#154
N = int(input())
A = list(map(int,input().split()))
A_set = set(A)
if(len(A)==len(A_set)):
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
#154
N = int(input())
A = map(int,input().split())
A_set = set(A)
if(len(A)==len(A_set)):
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
#154
N = int(input())
A = [int(input()) for i in range(N)]
A_set = set(A)
if(len(A)==len(A_set)):
    print('YES')
else:
    print('NO')
Problem p03013 (python)

Fixed submission:
n,m = map(int,input().split())
lis = [False]*(n+1)
a = []
for i in range(m):
    a = int(input())
    lis[a] = True

mod = 10**9+7
dp =[0]*(n+1)
dp[0] =1
for i in range(n):
    dp[i] %= mod
    if (lis[i]):dp[i] = 0
    if i+1 <=n:
        dp[i+1] += dp[i]
    if i+2 <=n:
        dp[i+2] += dp[i]

print(dp[n]%mod)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
lis = [0]*n+1
a = []
for i in range(m):
    a.append(int(input()))
    
mod = 10**9+7
ans = 0
if n==1:
    print(1)
elif n==2:
    if m==1:
        print(1)
    else:
        print(2)
else:
    if 1 in a and 2 in a:
        print(0)
    elif 1 in a:
        lis[1] = 1
    elif 2 in a:
        lis[0] = 1
    else:
        lis[0] = 1
        lis[1] = 2
    
    for j in range(3,n+1):
        if j in a:
            lis[0] = lis[1]
            lis[1] = 0
        else:
            ans = lis[0]%mod + lis[1]%mod
            lis[0] = lis[1]
            lis[1] = ans
        
        if lis[0] == 0 and lis[1] == 0:
            ans = 0
            break
        

    print(ans%mod)
Problem p02689 (python)

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

H2 = copy.copy(H)
for i in range(M):
    A, B = map(int, input().split())
    if H[A - 1] > H[B - 1]:
        H2[B - 1] = False
    elif H[A - 1] < H[B - 1]:
        H2[A-1] = False
    else:
        H2[A - 1] = False
        H2[B - 1] = False

H3 = H2.count(False)

print(len(H) - H3)

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

root = dict()
non_root = []
if M == 1:
    print(N-1)

for i in range(M):
    A, B = map(int, input().split())
    non_root.append(A)
    non_root.append(B)

    if H[A-1] > H[B-1]:
        root[A] = H[A-1]
        if B in root.keys():
            root.pop(root[B])
    elif H[A-1] < H[B-1]:
        root[B] = H[B - 1]
        if A in root.keys():
            root.pop(root[A])
    else:
        if B in root.keys():
            root.pop(root[B])
        if A in root.keys():
            root.pop(root[A])

print(len(root)+ (N- len(set(non_root))))

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

root = dict()
if M == 1:
    print(N-1)

for i in range(M):
    A, B = map(int, input().split())
    if H[A-1] > H[B-1]:
        root[A] = H[A-1]
        if B in root.keys():
            root.pop(root[B])
    elif H[A-1] < H[B-1]:
        root[B] = H[B - 1]
        if A in root.keys():
            root.pop(root[A])
    else:
        if B in root.keys():
            root.pop(root[B])
        if A in root.keys():
            root.pop(root[A])

print(len(root))

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

root = dict()

for i in range(M):
    A, B = map(int, input().split())
    if H[A-1] >= H[B-1]:
        root[A-1] = H[A-1]
        if B-1 in root.keys():
            root.pop(root[B-1])
    else:
        root[B - 1] = H[B - 1]
        if A-1 in root.keys():
            root.pop(root[A-1])


print(len(root))
Problem p02707 (python)

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

C = collections.Counter(A)

for i in range(1, N+1):
    if i in C.keys():
        print(C[i])
    else:
        print(0)

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

C = collections.Counter(A)

for i in range(1, N+1):
    if i in C.keys():
        print(C[i])
    else:
        print(0)
Problem p02753 (python)

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

Buggy submission (verdict: Runtime Error):
from decimal import *
import math

i = list(map(int, input().split()))
A = Decimal(i[0])
B = Decimal(i[1])

A_min = A // Decimal("0.08")
A_max = math.ceil(Decimal(A + 1) / Decimal("0.08"))
B_min = B // Decimal("0.1")
B_max = math.ceil(Decimal(B+1) / Decimal(0.1))

if A_max < B_min:
    print(-1)
elif A_min > B_max:
    print(-1)
elif A_min < B_min:
    print(B_min)
else:
    print(A_min)

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

N = int(i[0])
A = int(i[1])
B = int(i[2])

count_blue = 0

syou = N // (A + B)
amari = N % (A + B)

if amari > A:
    count_blue = A * syou + A
else:
    count_blue = A * syou + amari
   
print(count_blue)

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

N = int(i[0])
A = int(i[1])
B = int(i[2])

count_blue = 0

syou = N // (A + B)
amari = N % (A + B)

if amari > A:
    count_blue = A * syou + A
else:
    count_blue = A * syou + amari
    
count_blue
Problem p02773 (python)

Fixed submission:
N = int(input())
l = []

for _ in range(N):
    s = str(input())
    l.append(s)

import collections
c = collections.Counter(l)
c = c.most_common()

most_count = c[0][1]
c.sort()

for i in range(len(c)):
    if c[i][1] == most_count:
        print(c[i][0])

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

for _ in range(N):
    s = str(input())
    if s in d.keys():
        d[s] += 1
    else:
        d[s] = 1

ans = []

for i in range(len(d)):
    if d[i][1] == max(d.values()):
        ans.append(d[i][0])

ans = sorted(ans)

for _ in range(len(ans)):
    print(ans[_])

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

for _ in range(N):
    s = str(input())
    if s in d.keys():
        d[s] += 1
    else:
        d[s] = 1

ans = []

for i in range(len(sd)):
    if sd[i][1] == max(d.values()):
        ans.append(sd[i][0])

ans = sorted(ans)
for _ in range(len(ans)):
    print(ans[_])
Problem p02831 (python)

Fixed submission:
import fractions

a, b = map(int, input().split())

print(int((a * b) / fractions.gcd(a, b)))

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

a, b = map(int, input().split())

print(int((a * b) / np.gcd(a, b)))

Buggy submission (verdict: Runtime Error):
import math

a, b = map(int, input().split())

print(int((a * b) / math.gcd(a, b)))