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

Fixed submission:
N,M,K=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a_s=[0]
b_s=[0]
for i in range(N):
  if a_s[i]+a[i]>K:
    break
  a_s.append(a[i]+a_s[i])
for i in range(M):
  if b_s[i]+b[i]>K:
    break
  b_s.append(b[i]+b_s[i])
bn=len(b_s)-1
ans=0
for i in range(len(a_s)):
  while a_s[i]+b_s[bn]>K:
    bn-=1
  ans=max(ans,i+bn)
  
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,K=map(int,input().split())
import numpy as np
a=np.array(list(map(int,input().split())))
b=np.array(list(map(int,input().split())))
a_s=a.cumsum()
b_s=b.cumsum()
an=0
ans=0
while an<N and a_s[an]<=K:
    bn=0
  while bn<M and a_s[an]+b_s[bn]<=K:
    bn+=1
  if an+bn+1>ans:
    ans=an+bn+1
  an+=1
print(ans)
Problem p02676 (python)

Fixed submission:
k=int(input())
s=input()
import numpy as np
p=list(s)
l=len(p)
if l<=k:
  print(s)
else:
  arr=np.array(p)
  arr=arr[0:k]
  print(''.join(list(arr))+'...')

Buggy submission (verdict: Runtime Error):
k=int(input())
s=input()
import numpy as np
p=list(s)
l=len(p)
if l<=k:
  print(s)
else:
  arr=np.array(p)
  print(p+'...')
Problem p02570 (python)

Fixed submission:
D, T, S = input().split()
d = float(D)
t = float(T)
s = float(S)

a = float(d / s)

if a > t:
    print("No")
else:
    print("Yes")

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

if D // S > T:
    print('No')
else:
    print('Yes')
Problem p02595 (python)

Fixed submission:
import math
 
DISTANCE_NUM=0
 
N,D=map(int,input().split())
 
for _ in range(N):
  x,y=map(int,input().split())
  distance=math.sqrt(x**2+y**2)
  
  if distance <= D:
    DISTANCE_NUM+=1
    
print(DISTANCE_NUM)

Buggy submission (verdict: Runtime Error):
import math
 
DISTANCE_NUM=0
 
N,D=(int(x) for x in input.split())
 
for _ in range(N)
  x,y=(int(x) for x in input.split())
  distance=math.sqrt(x**2+y**2)
  
  if distance <= D:
    DISTANCE_NUM+=1
    
print(DISTANCE_NUM)

Buggy submission (verdict: Runtime Error):
import math

DISTANCE_NUM=0

N,D=(int(x) for x in input.split())

for _ in range(N)
  x,y=(int(x) for in input.split())
  distance=math.sqrt(x**2+y**2)
  
  if distance <= D:
    DISTANCE_NUM+=1
    
print(DISTANCE_NUM)
Problem p03835 (python)

Fixed submission:
K,S = map(int,input().split())
count = 0
for x in range(K+1):
    for y in range(K+1):
        z = S - x - y
        if (0 <= z < K + 1):
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
K,S = map(int,input().split())
count = 0
for i in range(0,K+1):
    X = i
    for j in range(0,K+1):
        Y = j
        for k in range(0,K+1):
            Z = k
            if ( ty == S):
                count += 1
print(count)
Problem p02552 (python)

Fixed submission:
def run(x):
    '''

    '''
    print('{}'.format(0 if x==1 else 1))



if __name__ == '__main__':
    x = int(input())
    run(x)

Buggy submission (verdict: Runtime Error):
def run(x):
    '''

    '''
    print('{}'.format(0 if x==1 else 1))



if __name__ == '__main__':
    x = int(input())
    run(x)def run(x):
    '''

    '''
    print('{}'.format(0 if x==1 else 1))



if __name__ == '__main__':
    x = int(input())
    run(x)
Problem p02577 (python)

Fixed submission:
def run(x):
    '''

    '''


    # sum = 0
    # while x > 0:
    #     sum += x%10
    #     x = int(x/10)

    # print('Yes' if sum % 9 == 0 else 'No')
    print('Yes' if x % 9 == 0 else 'No')


if __name__ == '__main__':
    x = int(input())
    run(x)

Buggy submission (verdict: Runtime Error):
def run(x):
    '''

    '''


    sum = 0
    while x > 0:
        sum += x%10
        x = int(x/10)

    print('Yes' if sum % 9 == 0 else 'No')


if __name__ == '__main__':
    x = int(input())
    run(x)
Problem p02629 (python)

Fixed submission:
import string

def run(n):
    '''
    '''
    _base_array = string.ascii_lowercase
    results = []
    while n > 0:
        results.append(_base_array[n%26 - 1])
        if n%26 == 0:
            n = n//26 - 1
            continue
        n = n//26

    print(''.join(results[::-1]))



if __name__ == '__main__':
    n = int(input())
    run(n)

Buggy submission (verdict: Runtime Error):
def run(n):
    '''
    '''
    _base_array = string.ascii_lowercase
    results = []
    while n > 0:
        results.append(_base_array[n%26 - 1])
        if n%26 == 0:
            n = n//26 - 1
            continue
        n = n//26

    print(''.join(results[::-1]))



if __name__ == '__main__':
    n = int(input())
    run(n)
Problem p02984 (python)

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

x = [None] * N
x[0] = sum(A) - 2 * sum([a for a in A[1::2]])
for i in range(N-1):
    x[i+1] = 2 * A[i] - x[i]
print(" ".join(map(str, x)))

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

import numpy as np

a = np.zeros((N, N))
for i in range(N-1):
    a[i][i] = 1
    a[i][i+1] = 1
a[-1][-1] = 1
a[-1][0] = 1
b = np.array(A) * 2
X = np.linalg.solve(a, b)
X = map(int, X)
print(" ".join(map(str, X)))

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

import numpy as np

a = np.zeros((N, N))
for i in range(N):
    a[i][i] = 1
    if i + 1 == N:
        a[i][0] = 1
    else:
        a[i][i+1] = 1
b = np.array(A)
X = np.linalg.solve(a, b) * 2
X = map(int, X)
print(" ".join(map(str, X)))
Problem p03806 (python)

Fixed submission:
#!python3

import copy

LI = lambda: list(map(int, input().split()))

# input
N, Ma, Mb = LI()
ABC = [LI() for _ in range(N)]

INF = 10 ** 5


def main():
    w = [[INF] * 401 for _ in range(401)]
    w[0][0] = 0
    for a, b, c in ABC:
        l = copy.deepcopy(w)
        for j in range(a, 401):
            for k in range(b, 401):
                l[j][k] = min(w[j][k], w[j - a][k - b] + c)
        w = l

    ans = INF
    n = 400 // max(Ma, Mb) + 1
    for i in range(1, n):
        ans = min(ans, w[Ma * i][Mb * i])
    ans = -1 if ans == INF else ans
    print(ans)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#!python3

LI = lambda: list(map(int, input().split()))

# input
N, Ma, Mb = LI()
ABC = [LI() for _ in range(N)]

INF = 10 ** 5


def main():
    w = [[INF] * 401 for _ in range(401)]
    w[0][0] = 0
    for a, b, c in ABC:
        l = w.copy()
        for j in range(a, 401):
            for k in range(b, 401):
                l[j][k] = min(l[j][k], w[j - a][k - b] + c)
        w = l

    ans = INF
    n = 400 // max(Ma, Mb) + 1
    for i in range(1, n):
        ans = min(ans, w[Ma * i][Mb * i])
    ans = -1 if ans == INF else ans
    print(ans)


if __name__ == "__main__":
    main()
Problem p02693 (python)

Fixed submission:
K = int(input())

A, B = map(int, input().split())

flag = False
for x in range(A, B+1):
  if x % K == 0:
    flag = True


if flag:
  print("OK")
else: 
  print("NG")

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

A, B = map(int, input().split())

flag = False
for x in range(A, B+1):
  if x % K == 0:
    flag = True
    
if flag:
  print("OK")
else: 
  print("NG")

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

A, B = map(int, input().split())

flag = False
for x in range(A, B+1):
  if x % K == 0:
    flag = True


if flag:
  print("OK")
else: 
  print("NG")

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

A, B = map(int, input().split())

flag = False
for x in range(A, B+1):
  if x % K == 0:
    flag = True


if flag:
  print("OK")
else: 
  print("NG")
Problem p02699 (python)

Fixed submission:
S, W = map(int, input().split())
if W >= S:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())if W >= S:  print("unsafe")else:  print("safe")

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

if W &gt;= S:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())
if W >= S:
  print(“unsafe”)
else:
  print(“safe”)
Problem p02723 (python)

Fixed submission:
S = input()
if S[2] == S[3] and S[4] == S[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
if n==17:
  print('YES')
  
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
S = input()
if S[2] == S[3] and S[4] == S[5]:
  print("Yes")
else:
  print("No"
Problem p02835 (python)

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

else:
  print("win")

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
 
if (A+B+C>=22):
  print("bust")

else:
  print("win")
Problem p03242 (python)

Fixed submission:
s = input()
ans = ""
for i in s:
  if(i == '9'):
    ans += '1'
  elif(i == '1'):
    ans += '9'
  else:
    ans += i
    
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
ans = ""
for i in s:
  if(i == '9'):
    ans += '1'
  else if(i == '1'):
    ans += '9'
  else:
    ans += i
    
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
ans = ""
for i in s:
  if(i == "9"):
    ans += "1"
  else if(i == "1"):
    ans += "9"
  else:
    ans += i
    
print(ans)
Problem p03307 (python)

Fixed submission:
n = int(input())
if(n %2==1):
  n *= 2
print(n)

Buggy submission (verdict: Runtime Error):
n = int(input())
if(n %2=1):
  n *= 2
print(n)
Problem p02793 (python)

Fixed submission:
def gcd(a,b):
	if b == 0:
		return a
	return gcd(b,a%b)

def lcm(a,b):
	p = a*b
	g = gcd(a,b);
	return p//g
MOD = int(10**9+7)
n = int(input())
a = list(map(int,input().split()))
lc = a[0];
for i in range(1,n):
	lc = lcm(a[i],lc)
ans = 0
for i in range(n):
	ans += (lc//a[i])
print(ans%MOD)

Buggy submission (verdict: Runtime Error):
from math import gcd
def lcm(a,b):
	p = a*b
	g = gcd(a,b);
	return p//g
MOD = int(10**9+7)
n = int(input())
a = list(map(int,input().split()))
lc = a[0];
for i in range(1,n):
	lc = lcm(a[i],lc)
ans = 0
for i in range(n):
	ans += (lc//a[i])
	ans %= MOD
print(ans)
Problem p02550 (python)

Fixed submission:
n,x,m = map(int,input().split())
a = []
a.append(0)
a.append(x)
isBreak = False
for i in range(1,n):
  #tmp = (a[i]**2)%m
  tmp = (a[i]%m)*(a[i]%m)
  tmp = tmp%m
  if tmp==0:
    break
  if tmp in a:
    isBreak = True
    break
  a.append(tmp)
#print(a)
if isBreak:
  i = 1
  while a[i]!=tmp:
    i+=1
  kurikaeshi = len(a) - i
  goukei = sum(a[i:])
  #print(goukei)
  tmp=(n-(len(a)-1))
  #print(tmp//kurikaeshi)
  a.append(tmp//kurikaeshi * goukei)
  #print(a)
  tmp = tmp%kurikaeshi
  if tmp!=0:
    t = sum(a[i:i+tmp])
    a.append(t)
print(sum(a))

Buggy submission (verdict: Runtime Error):
n,x,m = map(int,input().split())
a = []
a.append(0)
a.append(x)
for i in range(1,n):
  #tmp = (a[i]**2)%m
  tmp = (a[i]%m)*(a[i]%m)
  tmp = tmp%m
  if tmp==0:
    break
  if tmp in a:
    break
  a.append(tmp)
#print(a)
i = 1
while a[i]!=tmp:
  i+=1
kurikaeshi = len(a) - i
goukei = sum(a[i:])
#print(goukei)
tmp=(n-(len(a)-1))
#print(tmp//kurikaeshi)
a.append(tmp//kurikaeshi * goukei)
#print(a)
tmp = tmp%kurikaeshi
if tmp!=0:
  t = sum(a[i:i+tmp])
  a.append(t)
print(sum(a))
Problem p02623 (python)

Fixed submission:
n,m,k = map(int,input().split())
tmp_a = list(map(int,input().split()))
tmp_b = list(map(int,input().split()))
a = [0]
b = [0]
for i in range(n):
    a.append(a[i]+tmp_a[i])
for i in range(m):
    b.append(b[i]+tmp_b[i])
#print(a)
#print(b)
ans = 0
j = m
for i in range(n+1):
    if a[i] > k:
        break
    while b[j] > k - a[i]:
        j -= 1
    ans = max(ans,i+j)
print(ans)

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

def chk(i,time,a,b):
    if len(a)==0 and len(b)==0:
        return i
    if time>k:
        return i-1
    
    if len(a)==0:
        tmp_a = 10**9
    else:
        tmp_a = a.popleft()
        
    if len(b)==0:
        tmp_b = 10**9
    else:
        tmp_b = b.popleft()
        
    if tmp_a>tmp_b:
        time += tmp_b
        a.appendleft(tmp_a)
        i += 1
    else:
        time += tmp_a
        b.appendleft(tmp_b)
        i += 1
        
    tmp = chk(i,time,a,b)
    return tmp

n,m,k = map(int,input().split())
tmp_a = list(map(int,input().split()))
tmp_b = list(map(int,input().split()))
a = deque()
b = deque()
a.extend(tmp_a)
b.extend(tmp_b)
#print(a,b)

print(chk(0,0,a,b))

Buggy submission (verdict: Runtime Error):
def dfs(kazu,i,j,ans):
    global result
    if ans>k:
        result.append(kazu-1)
        return
    elif i==n and j==m:
        result.append(kazu)
        return
    elif i==n:
        #bの本を読む
        dfs(kazu+1,i,j+1,ans+b[j])
    elif j==m:
        #aの本を読む
        dfs(kazu+1,i+1,j,ans+a[i])
    else:
        #aの本を読む
        dfs(kazu+1,i+1,j,ans+a[i])
        #bの本を読む
        dfs(kazu+1,i,j+1,ans+b[j])

n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

result = []

dfs(0,0,0,0)

print(max(result))

Buggy submission (verdict: Runtime Error):
def dfs(kazu,i,j,ans):
    global result
    if ans>k:
        result.append(kazu-1)
        return
    elif i>=n and j>=m:
        result.append(kazu)
        return
    elif i>=n:
        #bの本を読む
        dfs(kazu+1,i,j+1,ans+b[j])
    elif j>=m:
        #aの本を読む
        dfs(kazu+1,i+1,j,ans+a[i])
    else:
        #aの本を読む
        dfs(kazu+1,i+1,j,ans+a[i])
        #bの本を読む
        dfs(kazu+1,i,j+1,ans+b[j])

n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

result = []

dfs(0,0,0,0)

print(max(result))
Problem p02693 (python)

Fixed submission:
k = int(input())
a,b = map(int,input().split())
ans = 0
for i in range(a//k,b//k+1):
  if a <= k * i <= b:
    ans = 1
if ans == 1:
  print('OK')
else:
  print('NG')

Buggy submission (verdict: Runtime Error):
k = int(input())
a,b = map(int,input().split())
ans = 0
for i in range(a//k,b//k+1):
  if a <= k * i <= b:
    ans = 1
if ans = 1:
  print('OK')
else:
  print('NG')
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,w = map(int,input())
if s < w:
  print('unsafe')
else:
  print('safe')

Buggy submission (verdict: Runtime Error):
s,w = int(input())
if s < w:
  print('unsafe')
else:
  print('safe')
Problem p02771 (python)

Fixed submission:
a,b,c = map(int,input().split())
if a == b and b == c and c == a:
    print('No')
elif a != b and b != c and c != a:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a == b and b == c and C == a:
    print('No')
elif a != b and b != c and C != a:
    print('No')
else:
    print('Yes')
Problem p03042 (python)

Fixed submission:
s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if (0==int(s[:2]) or 13<=int(s[:2])) and (0==int(s[-2:]) or 13<=int(s[-2:])):
    print(ans[3])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[2])
elif 0<int(s[:2])<=12:
    print(ans[1])
elif 0<int(s[-2:])<=12:
    print(ans[0])

Buggy submission (verdict: Runtime Error):
s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if (0==int(s[:2]) or 13<=int(s[:2])) and (0==int(s[-2:]) or 13<=int(s[-2:])):
    print(ans[4])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[3])
elif 0<int(s[:2])<=12:
    print(ans[2])
elif 0<int(s[-2:])<=12:
    print(ans[1])

Buggy submission (verdict: Runtime Error):
s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[3])
elif 0<int(s[:2])<=12:
    print(ans[2])
elif 0<int(s[-2:])<=12:
    print(ans[1])
else:
    print(ans[4])

Buggy submission (verdict: Runtime Error):
s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if 0<int(s[:2])<=12 and 0<int(s[-2:]<=12:
    print(ans[3])
elif 0<int(s[:2])<=12:
    print(ans[2])
elif 0<int(s[-2:])<=12:
    print(ans[1])
else:
    print(ans[4])
Problem p03774 (python)

Fixed submission:
def f(gx,gy):
    ans = 10**9
    no = 0
    for i in range(m):
        tmp = abs(gx-checkpoint[i][0]) + abs(gy-checkpoint[i][1])
        if tmp < ans:
            ans = tmp
            no = i
    return no+1

n,m = map(int,input().split())
gakusei = []
for i in range(n):
    x,y = map(int,input().split())
    gakusei.append([x,y])
checkpoint = []
for j in range(m):
    x,y = map(int,input().split())
    checkpoint.append([x,y])

#print(gakusei,checkpoint)
for i in range(n):
    print(f(gakusei[i][0],gakusei[i][1]))

Buggy submission (verdict: Runtime Error):
def mh(a,b,c,d):
    return abs(a-c)+abs(b-d)

n,m = map(int,input().split())
stu = []
for i in range(n):
    a,b = map(int,input().split())
    stu.append([a,b])
ans = [[99,1000000000] for i in range(m)]
#ans[1][1] = 0
#print(ans)
for j in range(1,m+1):
    x,y = map(int,input().split())
    for i in range(n):
        tmp = mh(stu[i][0],stu[i][1],x,y)
        if tmp < ans[i][1]:
            ans[i][0] = j
            ans[i][1] = tmp
for i in range(n):
    print(ans[i][0])
Problem p03803 (python)

Fixed submission:
Alice,Bob = map(int,input().split())
if Alice == 1:
    Alice = 14
if Bob == 1:
    Bob = 14
if Alice>Bob:
    print('Alice')
elif Alice==Bob:
    print('Draw')
else:
    print('Bob')

Buggy submission (verdict: Runtime Error):
Alice,Bob = map(int,input().split())
if Alice = 1:
    ALice = 14
if Bob = 1:
    Bob = 14
if Alice>Bob:
    print('Alice')
elif Alice==Bob:
    print('Draw')
else:
    print('Bob')
Problem p02627 (python)

Fixed submission:
X = input()
if X.isupper():
    print('A')
else:
    print('a')

Buggy submission (verdict: Runtime Error):
X = input()
if X.isupper():
	print('A')
else:
Problem p02766 (python)

Fixed submission:
N, K = list(map(int, input().split()))
ans = 0
while N > 0:
    N //= K
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
X = list(map(int, input().split()))
ans = 100 ** 100

for p in range(1, 101):
	now = 0
	for x in X:
		now += (p - x) ** 2
	ans = min(ans, now)
print(ans)
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()
if a >= 3200:
	print(s)
else:
	print('red')

Buggy submission (verdict: Runtime Error):
a = int(input())
s = input()
if a >= 3200:
	pint(s)
else:
	print('red')
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input()
if N%2 == 0:
  T = S[0:int(N/2)]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
if N%2 == 0:
  T = S[0:N/2]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
if N//2 == 0:
  T = S[0:N/2]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Problem p02594 (python)

Fixed submission:
n = int(input())
if n<30:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
if __name__ == "__main__":
    n = int(input())
    if x<29:
        print("No")
    else:
        print("Yes")
Problem p02623 (python)

Fixed submission:
n,m,k = map(int,input().split())

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

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

x = [0]

y = [0]

for i in range(n):
    x.append(x[i]+a[i])

for i in range(m):
    y.append(y[i]+b[i])

ans = 0

cnt = m

for i in range(n+1):
    
    if k-x[i]<0:
        break
    
    while y[cnt]>k-x[i]:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)

Buggy submission (verdict: Runtime Error):

n,m,k = map(int,input().split())

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

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

x = [0]

y = [0]

for i in range(n):
    x.append(x[i]+a[i])

for i in range(m):
    y.append(y[i]+b[i])

ans = 0

cnt = m

for i in range(n+1):
    
    if x[i]<0:
        break
    
    while y[cnt]>k-x[i]:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)
Problem p02659 (python)

Fixed submission:

import decimal

x = list(input().split())
 
a = int(x[0])
 
b = decimal.Decimal(x[1])
 
print(int(a*b))

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

print((a*b)//1)
Problem p02682 (python)

Fixed submission:

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

if k<=a:
    print(k)
else:
    x = k-a
    if x<=b:
        print(a)
    else:
        print(a-(x-b))

Buggy submission (verdict: Runtime Error):
if k<=a:
    print(k)
else:
    x = k-a
    if x<=b:
        print(a)
    else:
        print(a-(x-b))
Problem p02723 (python)

Fixed submission:
s = input()
if s[2]==s[3] and s[4]==s[5]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
if s[2]==s[3] and s[4]==s[5]:
    print("Yes")
else:
    print("No")
Problem p02829 (python)

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

Buggy submission (verdict: Runtime Error):
base = [1,2,3]
for i in range(2):
    del base[int(input())-1]
print(base[0])
Problem p02831 (python)

Fixed submission:
import fractions

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

def lcm(x,y):
    z = int(x*y/fractions.gcd(x,y))
    return z
    
print(lcm(a,b))

Buggy submission (verdict: Runtime Error):
import math

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

def lcm(x,y):
    z = int(x*y/math.gcd(x,y))
    return z
    
print(lcm(a,b))

Buggy submission (verdict: Runtime Error):
import math
 
a,b = map(int,input().split())
 
def lcm(x,y):
    return x*y/(math.gcd(x,y)
 
print(int(lcm(a,b)))

Buggy submission (verdict: Runtime Error):
import math
 
a,b = map(int,input().split())
 
def lcm(x,y):
    return (x*y)/(math.gcd(x,y))
 
print(int(lcm(a,b)))

Buggy submission (verdict: Runtime Error):
import math
 
a,b = map(int,input().split())
 
def lcm(x,y):
    return((x*y)/(math.gcd(x,y)))
 
print(int(lcm(a,b)))

Buggy submission (verdict: Runtime Error):
import math
 
a,b = map(int,input().split())
 
def lcm(x,y):
    return(x*y//(math.gcd(x,y)))
 
print(lcm(a,b))

Buggy submission (verdict: Runtime Error):
import math

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

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

print(lcm(a,b))

Buggy submission (verdict: Runtime Error):
import math

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

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

print(lcm(a,b))
Problem p02836 (python)

Fixed submission:
s = list(input())

ans = 0

rs = s.copy()
rs = rs[::-1]

for i in range(len(s)//2):
    if s[i] != rs[i]:
        ans += 1
        
print(ans)

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

ans = 0

rs = s.copy()
rs = rs[::-1]

for i in range(len(s)//2):
    if s[i] != rs[i]:
        ans += 1
        
print(ans)
Problem p02860 (python)

Fixed submission:
n = int(input())

if n%2 == 1:
    print("No")
else:
    s = list(input())
    s1 = s[:n//2]
    s2 = s[n//2:]
    if s1 == s2:
        print("Yes")
    else:
        print("No")

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

if n%2 == 1:
    print("No")
else:
    s = list(input())
    s1 = s[:n//2].copy()
    s2 = s[n//2:]copy()
    if s1 == s2:
        print("Yes")
    else:
        print("No")
Problem p02881 (python)

Fixed submission:
import math

n = int(input())

t = int(math.sqrt(n))

ans = 0

for i in reversed(range(t+1)):
    if n % i == 0:
        ans = n//i+i
        break
        
print(ans-2)

Buggy submission (verdict: Runtime Error):
import math

n = int(input())

t = int(math.sqrt(n))

ans = 0

for i in reversed(range(t)):
    if n % i == 0:
        ans = n//i+i
        break
        
print(ans-2)
Problem p02897 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
if n%2==1:
    print(float(((n+1)/2)/n)
else:
    print(0.5)
Problem p02987 (python)

Fixed submission:
s = list(input())
s.sort()
if s[0] == s[1] and s[2] == s[3] and s[1] != s[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
s.sort()
if s[0] == s[1] and s[2] == s[3]:
    print("Yes")
else:
    print("No")
Problem p03011 (python)

Fixed submission:
a,b,c = map(int,input().split())
 
s = a+b+c
 
print(s-max(a,b,c))

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

s = sum(a,b,c)

print(s-max(a,b,c))