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

Fixed submission:
A=int(input())
B=int(input())
C=int(input())
print((A-B)%C)

Buggy submission (verdict: Runtime Error):
def f(a,b,c,d):
    if a<0 or b<0 or c<0 or d<0:
        return 0
    if d==0:
        return 1
    return f(a-1,b,c,d-10) + f(a,b-1,c,d-2)+f(a,b,c-1,d-1)
A=int(input())
B=int(input())
C=int(input())
D=int(input())
A//=50
B//=50
C//=50
D//=50
print(f(A,B,C,D))
Problem p03469 (python)

Fixed submission:
s=list(input())
s[3]='8'
print("".join(s))

Buggy submission (verdict: Runtime Error):
s=intput()
s[3]='8'
print(s)
Problem p03493 (python)

Fixed submission:
A=input()
cnt=0
if A[0]=='1':
    cnt+=1
if A[1]=='1':
    cnt+=1
if A[2]=='1':
    cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=input().split()
ans=111111111
for i in range(A):
    C=B[i]
    cnt=0
    while C%2==0:
        C//=2
        cnt+=1
    if ans>cnt:
        ans=cnt
print(ans)

Buggy submission (verdict: Runtime Error):
A=input()
cnt=0
if A[0]=='1':
    cnt++
if A[1]=='1':
    cnt++
if A[2]=='1':
    cnt++
print(cnt)
Problem p03502 (python)

Fixed submission:
N=input()
A=int(N)
B=0
for i in N:
	B+=int(i)
	
if A%B==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N=input()
A=int(input())
B=0
for i in N:
    B+=int(i)
if A%B==0:
    print("Yes")
else:
    print("No")
Problem p03543 (python)

Fixed submission:
A=input()
if A[0]==A[1] and A[1]==A[2]:
    print("Yes")
elif A[1]==A[2] and A[2]==A[3]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A=input()
if A[0]==A[1] and A[1]==A[2]:
    print("Yes")
elif if A[1]==A[2] and A[2]==A[3]:
    print("Yes")
else:
    print("No")
Problem p03573 (python)

Fixed submission:
A,B,C=map(int,input().split())
if A==B:
    print(C)
if B==C:
    print(A)
if A==C:
    print(B)

Buggy submission (verdict: Runtime Error):
A,B,C=map(int,intpu().split())
if A==B:
    print(C)
if B==C:
    print(B)
if A==C:
    print(A)
Problem p03813 (python)

Fixed submission:
N=int(input())
if N<1200:
    print("ABC")
else:
    print("ARC")

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
int a,b;
int main(){
    char c;
    for(int i=1;cin>>c;i++){
        if(c=='A'&&!a)a=i;
        if(c=='Z')b=i;
    }
    cout<<b-a+1<<endl;
    return 0;
}
Problem p02803 (python)

Fixed submission:
def warshall_floyd(d, n):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

H, W = map(int,input().split())
N = H * W

d = [[float("inf") for i in range(N)] for i in range(N)] 

M = [[1 for i in range(W+1)] for i in range(H+1)]
for i in range(H):
    m = input().strip()
    for j in range(W):
        if m[j] == '.':
            M[i][j] = 0

for i in range(H):
    for j in range(W):
        if M[i][j] == 0:
            d[W*i+j][W*i+j] = 0
            if M[i][j+1] == 0:
                d[W*i+j][W*i+j+1] = 1
                d[W*i+j+1][W*i+j] = 1
            if M[i+1][j] == 0:
                d[W*i+j][W*(i+1)+j] = 1
                d[W*(i+1)+j][W*i+j] = 1

o = warshall_floyd(d, N)
ans = 0
for i in range(N):
    for j in range(N):
        if o[i][j] != float('inf'):
            ans = max(ans, o[i][j])
print(ans)

Buggy submission (verdict: Runtime Error):
def Warshall_floyd(d, n):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

H, W = map(int,input().split())
N = H * W

d = [[float("inf") for i in range(N)] for i in range(N)] 

M = [[1 for i in range(W+1)] for i in range(H+1)]
for i in range(H):
    m = input().strip()
    for j in range(W):
        if m[j] == '.':
            M[i][j] = 0

for i in range(H):
    for j in range(W):
        if M[i][j] == 0:
            d[W*i+j][W*i+j] = 0
            if M[i][j+1] == 0:
                d[W*i+j][W*i+j+1] = 1
                d[W*i+j+1][W*i+j] = 1
            if M[i+1][j] == 0:
                d[W*i+j][W*(i+1)+j] = 1
                d[W*(i+1)+j][W*i+j] = 1

o = warshall_floyd(d, N)
ans = 0
for i in range(N):
    for j in range(N):
        if o[i][j] != float('inf'):
            ans = max(ans, o[i][j])
print(ans)
Problem p02952 (python)

Fixed submission:
def hoge(n):
    return 10 ** n - 10 ** (n - 1)

N = input().strip()
o = len(N)
N = int(N)

ans = 0
for i in range(o):
    if i % 2 == 0:
        continue
    ans += hoge(i)

if o % 2 == 1:
    ans += N - 10 ** (o-1) + 1

print(ans)

Buggy submission (verdict: Runtime Error):
N = input().strip()
o = len(N)
N = int(N)

ans = 0
for i in range(o):
    if i % 2 == 0:
        continue
    ans += hoge(i)

if o % 2 == 1:
    ans += N - 10 ** (o-1) + 1

print(ans)
Problem p02960 (python)

Fixed submission:
S = input().strip()

MOD = 10 ** 9 + 7

N = len(S)
DP = [[0] * 13 for i in range(N+1)]
DP[0][0] = 1

for _i, s in enumerate(S):
    i = _i + 1

    if s == '?':
        candidate = range(10)
    else:
        candidate = [int(s)]

    for j in range(13):
        for c in candidate:
            m = (j * 10 + c) % 13
            DP[i][m] += DP[i-1][j]
    for j in range(13):
        DP[i][j] %= MOD

print(int(DP[-1][5]))

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


S = input().strip()

MOD = 10 ** 9 + 7

N = len(S)
DP = np.zeros((N+1, 13))
DP[0, 0] = 1

for _i, s in enumerate(S):
    i = _i + 1

    if s == '?':
        candidate = range(10)
    else:
        candidate = [int(s)]

    for j in range(13):
        for c in candidate:
            m = (j * 10 + c) % 13
            DP[i, m] += DP[i-1, j]
    DP[i] %= MOD

print(int(DP[-1, 5]))

Buggy submission (verdict: Runtime Error):
S = input().strip()

MOD = 10 ** 9 + 7

N = len(S)
DP = np.zeros((N+1, 13), dtype=np.int32)
DP[0, 0] = 1

for _i, s in enumerate(S):
    i = _i + 1

    if s == '?':
        candidate = range(10)
    else:
        candidate = [int(s)]

    for j in range(13):
        for c in candidate:
            m = (j * 10 + c) % 13
            DP[i, m] += DP[i-1, j]
    DP[i] %= MOD

print(DP[-1, 5])
Problem p02952 (python)

Fixed submission:
n = int(input())

if len(str(n)) % 2 == 0:
  print(int("90" * int(len(str(n)) / 2 - 1) + "9"))
elif len(str(n)) == 1:
  print(n)
else:
  print(n - int("9" * (len(str(n)) -1)) + int("90" * (int((len(str(n)) - 1) / 2) - 1) + "9"))

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

if len(str(n)) % 2 == 0:
  print(int("90" * int(len(str(n)) / 2 - 1) + "9"))
else:
  print(n - int("9" * (len(str(n)) -1)) + int("90" * (int((len(str(n)) - 1) / 2) - 1) + "9"))
Problem p02975 (python)

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

st = set(a)
lst = list(st)

if n == 3 and a[0] ^ a[1] == a[2]:
  print("Yes")
elif n  >= 4 and st == {0}:
  print("Yes")
elif n % 3 == 0 and len(st) == 2 and a.count(0) == n /3:
  print("Yes")
elif n % 3 == 0 and len(st) == 3 and lst[0] ^ lst[1] == lst[2] and a.count(lst[0]) == n /3 and a.count(lst[1]) == n/3:
  print("Yes")
else:
  print("No")

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

st = set(a)

if n == 3 and a[0] ^ a[1] == a[2]:
  print("Yes")
elif n  >= 4 and st == {0}:
  print("Yes")
elif n % 3 == 0 and len(st) == 2 and (0 in a) and a.count(0) = n /3:
  print("Yes")
elif n % 3 == 0 and len(st) == 3 and a.count(st.pop) = n /3 anda.count(st.pop) = n/3:
  print("Yes")
else:
  print("No")

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

if n == 3 and a[0] ^ a[1] == a[2]:
  print("Yes")
elif n >= 4 and set(a) = {0}:
  print("Yes")
else:
  print("No")

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

if n == 3 and a[0] ^ a[1] == a[2]:
  print("Yes")
elif n >= 4 and set(a) = set([1]):
  print("Yes")
else:
  print("No")
Problem p03141 (python)

Fixed submission:
n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
b = sorted([[a[i][0] + a[i][1], a[i][0]] for i in range(n)])
taka = 0
aoki = 0

for i in range(n):
  if i % 2 == 0:
    taka += b[n - i - 1][1]
  else:
    aoki += b[n - i - 1][0] - b[n - i - 1][1]

print(taka - aoki)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
b = sorted([[a[i][0] + a[i][1], a[i][0]] for i in range(n)])
taka = 0
aoki = 0

for i in range(n):
  if i % 2 == 0:
    taka += b[n - k - i - 1][1]
  else:
    aoki += b[n - k - i - 1][0] - b[n - k - i - 1][1]

print(taka - aoki)
Problem p03193 (python)

Fixed submission:
n = 0
N, H, W = map(int, input().split())
for i in range(N):
  A, B = map(int, input().split())
  if A >= H and B >= W:
    n += 1
print(n)

Buggy submission (verdict: Runtime Error):
N, H, W = map(int, input().split())
n = 0
for i in range(N):
  A, B = map(int, input().split)
  if A >= H and B >= W:
    n += 1
print(n)
Problem p03200 (python)

Fixed submission:
S = input()
white = []
count = 0

for i in range(len(S)):
  if S[i] == "W":
    white.append(i)

for i in range(len(white)):
  count += white[i] - i

print(count)

Buggy submission (verdict: Runtime Error):
S = input()
black = 0
count = 0

for i in range(len(S)):
  if S[i] == "B":
    black += 1

def f(N, BW, black):
  if N == "B" or N =="W":
    return 0
  elif BW == "B":
    return f(N[1:], N[1], black - 1) + len(N) - black
  elif BW == "W":
    return f(N[1:], N[1], black)

print(f(S, S[0], black))

Buggy submission (verdict: Runtime Error):
S = input()
black = 0
count = 0
a = []

for i in range(len(S)):
  a.append(S[i])

for i in range(len(S)):
  if S[i] == "B":
    black += 1

def f(N, BW, black):
  if N == "B" or N =="W":
    return 0
  elif BW == "B":
    return f(N[1:], N[1], black - 1) + len(N) - black
  elif BW == "W":
    return f(N[1:], N[1], black)

print(f(S, S[0], black))
Problem p03627 (python)

Fixed submission:
n=int(input())
freq={}
for x in list(map(int,input().split())):
    if x not in freq:
        freq[x] = 1
    else:
        freq[x] += 1

s = []
ans = [0]
for i, v in sorted(list(freq.items()),reverse=True):
    if v >= 4:
        ans.append(i * i)
    if v >= 2:
        s.append(i)
        if len(s) == 2:
            ans.append(s[0] * s[1])

print(max(ans))

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
S = [input() for _ in range(H)]

ans = max(H, W)

f = [1] * W
for i in range(1, H):
    f = [(f[j]+1) if (S[i-1][j:j+2] + S[i][j:j+2]).count('#') in [0,2,4] else 1 for j in range(W-1)] + [0]
    stk = []
    for j, v in enumerate(f):
        while len(stk) > 0 and f[stk[-1]] >= v:
            ans = max(ans, f[stk.pop()] * (j - (stk[-1] if len(stk) > 0 else -1)))
        stk.append(j)

print(ans)
Problem p02936 (python)

Fixed submission:
import sys,resource
from collections import deque
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inm   = lambda:      map(int, input().split())
DBG = True # and False
R = 10**9 + 7

def setrlim():
  sys.setrecursionlimit(250000)
  soft,hard = resource.getrlimit(resource.RLIMIT_STACK)
  # setrlimit works on ubuntu (and atcoder), but not on WSL
  resource.setrlimit(resource.RLIMIT_STACK, (256*1024*1024,hard))

n,q = inm()
dst = [ [] for i in range(n) ]
for i in range(n-1):
    a,b = inm()
    a -= 1
    b -= 1
    dst[a].append(b)
v = [0]*n
for i in range(q):
    p,x = inm()
    p -= 1
    v[p] += x
y = [0]*n

d = deque([])
d.append(0)
while len(d)>0:
    i = d.popleft()
    for j in dst[i]:
        v[j] += v[i]
        d.append(j)

for i in range(n):
    printn((' ' if i>0 else '') + str(v[i]))
print("")

Buggy submission (verdict: Runtime Error):
import sys,heapq,math,resource
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def setrlim():
  sys.setrecursionlimit(250000)
  soft,hard = resource.getrlimit(RLIMIT_STACK)
  # setrlimit works on ubuntu (and atcoder), but not on WSL
  resource.setrlimit(RLIMIT_STACK, (128*1024*1024,hard))

def dfs(i,fromup):
    y[i] = fromup + v[i]
    for d in dst[i]:
        dfs(d,y[i])

n,q = inm()
dst = [ [] for i in range(n) ]
for i in range(n-1):
    a,b = inm()
    a -= 1
    b -= 1
    dst[a].append(b)
v = [0]*n
for i in range(q):
    p,x = inm()
    p -= 1
    v[p] += x
y = [0]*n
dfs(0,0)
for i in range(n):
    printn((' ' if i>0 else '') + str(y[i]))
print("")

Buggy submission (verdict: Runtime Error):
import sys,heapq,math,resource
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def setrlim():
  sys.setrecursionlimit(250000)
  soft,hard = resource.getrlimit(RLIMIT_STACK)
  # setrlimit works on ubuntu (and atcoder), but not on WSL
  #resource.setrlimit(RLIMIT_STACK, (128*1024*1024,hard))

def dfs(i,fromup):
    y[i] = fromup + v[i]
    for d in dst[i]:
        dfs(d,y[i])

n,q = inm()
dst = [ [] for i in range(n) ]
for i in range(n-1):
    a,b = inm()
    a -= 1
    b -= 1
    dst[a].append(b)
v = [0]*n
for i in range(q):
    p,x = inm()
    p -= 1
    v[p] += x
y = [0]*n
dfs(0,0)
for i in range(n):
    printn((' ' if i>0 else '') + str(y[i]))
print("")
Problem p03096 (python)

Fixed submission:
import sys
DBG =  not True
R = 1000000007
MAXN = 200000
n = int(input())
c = []
for i in range(n):
    c.append(int(input()))
tot = 1
s = [0] * (MAXN+1)
for i in range(n):
    if i > 0 and c[i] == c[i-1]:
        continue
    x = s[c[i]]
    tot = (tot + x) % R
    s[c[i]] = tot
    if DBG:
        print("i {} sci {} tot {} newt {}".format(i,x,s[c[i]],tot))
        print(s)
print(tot)

Buggy submission (verdict: Runtime Error):
import sys
DBG =  not True
R = 1000000007
n = int(input())
c = []
for i in range(n):
    c.append(int(input()))
tot = 1
s = [0] * (n+1)
for i in range(n):
    if i > 0 and c[i] == c[i-1]:
        continue
    x = s[c[i]]
    tot = (tot + x) % R
    s[c[i]] = tot
    if DBG:
        print("i {} sci {} tot {} newt {}".format(i,x,s[c[i]],tot))
        print(s)
print(tot)

Buggy submission (verdict: Runtime Error):
import sys
DBG =  not True
R = 1000000007
n = int(input())
c = []
for i in range(n):
    c.append(int(input()))
tot = 1
s = [0] * n
for i in range(n):
    if i > 0 and c[i] == c[i-1]:
        continue
    x = s[c[i]]
    tot = (tot + x) % R
    s[c[i]] = tot
    if DBG:
        print("i {} sci {} tot {} newt {}".format(i,x,s[c[i]],tot))
        print(s)
print(tot)
Problem p03730 (python)

Fixed submission:
import sys
import fractions
DBG = True
a,b,c =      map(int, input().split())
g = fractions.gcd(a,b)
for i in range(b):
    if (g*i)%b == c:
        print('YES')
        sys.exit(0)
print('NO')

Buggy submission (verdict: Runtime Error):
import sys
import fraction
DBG = True
a,b,c =      map(int, input().split())
g = math.gcd(a,b)
for i in range(b):
    if (g*i)%b == c:
        print('YES')
        sys.exit(0)
print('NO')

Buggy submission (verdict: Runtime Error):
import sys
import math
DBG = True
a,b,c =      map(int, input().split())
g = math.gcd(a,b)
for i in range(b):
    if (g*i)%b == c:
        print('YES')
        sys.exit(0)
print('NO')
Problem p03434 (python)

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

for i, j in enumerate(a):
    if i % 2 == 0:
        ans += j
    else:
        ans -= j

print(abs(ans))

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

print(sum(a[::2] - sum(a[1::2])))
Problem p03448 (python)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a + 1):
    for j in range(b + 1):
        for k in range(c + 1):
            if 500 * i + 100 * j + 50 * k == x:
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a + 1):
    if 500 * i == x:
        count += 1
        break
    else if 500 * i > x:
        break
    else:
        for j in range(b + 1):
            if 500 * i + 100 * j == x:
                count += 1
                break
            else if 500 * i + 100 * j > x:
                break
            else:
                for k in range(c + 1):
                    if 500 * i + 100 * j + 50 * k == x:
                        count += 1
                        break
print(count)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a + 1):
    for j in (b + 1):
        for k in (c + 1):
            if 500 * i + 100 * j + 50 * k == x:
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in a:
    for j in b:
        for k in c:
            if 500*i + 100*j + 50*k == x:
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in a:
    for j in b:
        for k in c:
            if 500*i + 100*j + 50*k == x:
                count += 1
Problem p03493 (python)

Fixed submission:
print(input().count('1'))

Buggy submission (verdict: Runtime Error):
n = input()
a = [bin(int(x))[2:] for x in input().split()]
a = [len(x) - (x.rfind('1') + 1) for x in a]
print(min(a))
Problem p02756 (python)

Fixed submission:
from collections import deque
letter = deque(input())
Q= int(input())
reversed = False
for i in range(Q):
    query = input().split()
    if len(query)==1:
        reversed = not bool(reversed)
    else:
        if int(query[1])==1: #まえに追加
            if reversed == False:
                letter.appendleft(query[2])
            else:
                letter.append(query[2])
        else:
            if reversed == False:
                letter.append(query[2])
            else:
                letter.appendleft(query[2])
if reversed==True:
    letter.reverse()

output = ''.join(letter)
print(output)

Buggy submission (verdict: Runtime Error):
from collections import deque
true_letter = input()
Q= int(input())
letter = deque(['*'])
reversed = False
for i in range(Q):
    query = input().split()
    if len(query)==1:
        reversed = not bool(reversed)
    else:
        if int(query[1])==1: #まえに追加
            if reversed == False:
                letter.insert(0,query[2])
            else:
                letter.append(query[2])
        else:
            if reversed == False:
                letter.append(query[2])
            else:
                letter.insert(0,query[2])
if reversed==True:
    letter.reverse()

output = ''.join(letter)
output = output.replace('*',true_letter)
print(output)
Problem p02843 (python)

Fixed submission:
x = input()

if int(x)<100:
  print('0')
  exit()

d1 = int(x[:-2])
d2 = int(x[-2:])
n = -(-d2//5)

print('1' if d1-n>=0 else '0')

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

d1 = int(x[:-2])
d2 = int(x[-2:])
n = -(-d2//5)

print('1' if d1-n>=0 else '0')
Problem p03076 (python)

Fixed submission:
import math
L = [input() for _ in range(5)]
lm = int(L[0][-1])
v = int(L[0])
for l in L:
  if int(l[-1])<lm and l[-1]!='0':
    lm = int(l[-1])
    v = int(l)
t = 0
L.remove(str(v))
for l in L:
  t += math.ceil(int(l)/10)*10
print(t + v)

Buggy submission (verdict: Runtime Error):
import math
L = [input() for _ in range(5)]
lm = 10
v = 0
for l in L:
  if int(l[-1])<lm and l[-1]!='0':
    lm = int(l[-1])
    v = int(l)
t = 0
L.remove(str(v))
for l in L:
  t += math.ceil(int(l)/10)*10
print(t + v)

Buggy submission (verdict: Runtime Error):
import math
L = [input() for _ in range(5)]
lm = 9
v = 0
for l in L:
  if int(l[-1])<lm and l[-1]!='0':
    lm = int(l[-1])
    v = int(l)
t = 0
L.remove(str(v))
for l in L:
  t += math.ceil(int(l)/10)*10
print(t + v)
Problem p03292 (python)

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

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

print("Yes" if t in s*2 else "No")
Problem p02742 (python)

Fixed submission:
import math

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

if a == 1 or b == 1:
    print(1)
else:
    print(math.ceil(a*b/2))

Buggy submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())
c = math.ceil(a*b/2)
if a = b = 1:
    print(1)
else:
    print(c)

Buggy submission (verdict: Runtime Error):
import math

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

if a = b = 1:
    print(1)
else:
    print(math.ceil(a*b/2))

Buggy submission (verdict: Runtime Error):
import math

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

c = a*b/2
print(c)
~                                                                               
~
Problem p02743 (python)

Fixed submission:
import math
a, b, c=input().split(" ")
a = int(a) 
b = int(b)
c = int(c) 

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
a = float(a) 
b = float(b)
c = float(c) 
if  a*b < ((c-a-b)/2)*((c-a-b)/):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")
 
if float(a) + 2*math.sqrt(float(a)) * math.sqrt(float(b)) + float(b) < c:
  print("Yes")
else:
  print("No")

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

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

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

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

Buggy submission (verdict: Runtime Error):
import math
a, b, c=input().split(" ")

return math.sqrt(a) + math.sqrt(b) < math.sqrt(c)
Problem p02853 (python)

Fixed submission:
x,y = map(int,input().split())
s=[0,]
d={
  1:300000,
  2:200000,
  3:100000,
}

if x in d:
  s.append(d[x])

if y in d:
  s.append(d[y])

if x==1 and y==1:
  s.append(400000)
  
print(sum(s))

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
s=[0,]
d={
  1:30000,
  2:20000,
  3,10000,
}

if x in d:
  s.append(d[x])

if y in d:
  s.append(d[y])

if x==1 and y==1:
  s.append(40000)
  
print(sum(s))
Problem p03071 (python)

Fixed submission:
A,B = map(int,input().split())
x=0

if A>B:
  x=x+A
  A=A-1
else:
  x=x+B
  B=B-1
  
if A>B:
  x=x+A
  A=A-1
else:
  x=x+B
  B=B-1
   
print(x)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
x=0
def f():
  if A>B:
    x=x+A
    A=A-1
  else:
    x=x+B
    B=B-1
    
f()
f()
print(x)
Problem p03129 (python)

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

if int((n+1)/2)>=k:
  print("YES")
else:
  print("NO")

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

if int((n+1)/2)=>k:
  print("YES")
else:
  print("NO")
Problem p03563 (python)

Fixed submission:
r=int(input())
g=int(input())

print(2*g-r)

Buggy submission (verdict: Runtime Error):
r=int(input())
g=int(input())

print(2g-r)

Buggy submission (verdict: Runtime Error):
r=int(input())
g=int(input())

print(2g-r)
Problem p03573 (python)

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

if a==c:
  print(b)
elif a==b:
  print(c)
else:
  print(a)

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

if a==c:
  print(b)
elif a==b:
  print(c)
else:
  print(a)
Problem p03671 (python)

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

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

s.sort()

print((s[0])+(s[1]))