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

Fixed submission:
n,k=map(int,raw_input().split())
c=[0]*200
for i in[0]*n:c[ord(raw_input()[0])]+=1
p=a=0
while p<1:
 c.sort();p=k;a+=1
 for i in range(k+1):p-=c[-i]>0;c[-i]-=1
print a-1

Buggy submission (verdict: Runtime Error):
n,k=map(int,raw_input().split())
c=[0]*200
r=range(n)
for i in r:c[ord(raw_input()[0])]+=1
c.sort()
p=a=0
while p<1:
 p=k;a+=1
 for i in r:
  if p*c[-i-1]:p-=1;c[-i-1]-=1
print a-1
Problem p03505 (python)

Fixed submission:
K,A,B=map(int,input().split())
if A>=K: print(1)
elif A-B<=0: print(-1)
else: 
  n = (K-A-1) // (A-B) + 1
  print(2*n +1)

Buggy submission (verdict: Runtime Error):
K,A,B=map(int,input().split())
n = (K-A-1) // (A-B) + 1
if A>=K: print(1)
elif A-B<=0: print(-1)
else: print(2*n +1)

Buggy submission (verdict: Runtime Error):
import math
K,A,B=map(int,input().split())
ini=K-A
up=A-B
print(2*math.ceil(ini/up) +1)
Problem p03511 (python)

Fixed submission:
def main():
    L = int(input())
    S, T = (input() for _ in [0] * 2)

    ans = []
    apnd = ans.append
    a = S
    b = T
    i = 0
    for _ in [0] * 2:
        while 1:
            x = L - (len(b) * i)
            div_, mod_ = divmod(x, len(a))
            if not mod_:
                apnd(a * div_ + b * i)
                break
            i += 1
        i = 0
        a, b = b, a
    print(min(ans))

main()

Buggy submission (verdict: Runtime Error):
def main():
    L = int(input())
    S, T = (input() for _ in [0] * 2)

    s = S * len(T)
    t = T * len(S)
    if s < t:
        a = S
        b = T
    else:
        a = T
        b = S

    i = 0
    while 1:
        x = L - (len(b) * i)
        div_, mod_ = divmod(x, len(a))
        if not mod_:
            ans = a * div_ + b * i
            break
        i += 1
    print(ans)

main()
Problem p03505 (python)

Fixed submission:
#!/usr/bin/env python3
def solve(k, a, b):
    if a - b <= 0:
        if k <= a:
            return 1
        else:
            return -1
    return 1 + (k - a + (a - b) - 1) // (a - b) * 2
k, a, b = map(int, input().split())
print(solve(k, a, b))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
def solve(k, a, b):
    if a - b <= 0 and a < k:
        return -1
    return 1 + (k - a + (a - b) - 1) // (a - b) * 2
k, a, b = map(int, input().split())
print(solve(k, a, b))
Problem p03892 (python)

Fixed submission:
#!/usr/bin/env python3
import fractions
a, b, c, d = map(int, input().split())
h = abs(a - c)
w = abs(b - d)
if h == 0 or w == 0:
    ans = 0
else:
    h1 = h // fractions.gcd(h, w)
    w1 = w // fractions.gcd(h, w)
    ans = (h1 + w1 - 1) * fractions.gcd(h, w)
print(ans)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import math
a, b, c, d = map(int, input().split())
h = abs(a - c)
w = abs(b - d)
h1 = h // math.gcd(h, w)
w1 = w // math.gcd(h, w)
print((h1 + w1 - 1) * math.gcd(h, w))
Problem p03888 (python)

Fixed submission:
a,b=map(int,input().split())
print((a**-1+b**-1)**-1)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input())
print((a**-1+b**-1)**-1)
Problem p03623 (python)

Fixed submission:
inp = raw_input()#raw_input accept number and literary,input accept number only
list = inp.split()
x = int(list[0])
a = int(list[1])
b = int(list[2])
if abs(a-x)<abs(b-x):
  print('A')
else:
  print('B')

Buggy submission (verdict: Runtime Error):
inp = raw_input()
list = inp.split()
x = int(list[0])
a = int(list[1])
b = int(list[2])
if abs(a-x)<abs(b-x):
  print('A')
else:
  print('B')

Buggy submission (verdict: Runtime Error):
inp = raw_input()
list = inp.split()
x = int(list[0])
a = int(list[1])
b = int(list[2])
if abs(a-x)<abs(b-x):
  print('A')
else:
  print('B')
Problem p03543 (python)

Fixed submission:
str = raw_input()
print "Yes" if((str[0] == str[1] and str[1] == str[2]) or (str[1] == str[2] and str[2] == str[3]))else "No"

Buggy submission (verdict: Runtime Error):
str = raw_input()
print "Yes" if((str[0] == str[1] and str[1] == str[2]) or (str[1] == str[2] and str[2] == str[3]))else "No

Buggy submission (verdict: Runtime Error):
str = raw_input()[0:-1]
print "Yes" if((str[0] == str[1] and str[1] == str[2] and str[2] == str[3]) or (str[1] == str[2] and str[2] == str[3] and str[3] == str[4])) else "NO"

Buggy submission (verdict: Runtime Error):
str = raw_input()
print "Yes" if((str[0] == str[1] and str[1] == str[2] and str[2] == str[3]) or (str[1] == str[2] and str[2] == str[3] and str[3] == str[4])) else "NO"
Problem p03557 (python)

Fixed submission:


N = int(raw_input())
As = raw_input().split(" ")
Bs = raw_input().split(" ")
Cs = raw_input().split(" ")

As = [(int(i), 2) for i in As]
Bs = [(int(i), 1) for i in Bs]
Cs = [(int(i), 0) for i in Cs]

l = sorted(As + Bs + Cs, key=lambda x: x[0] + x[1] * 0.1)

ac = 0
bc = 0
cc = 0

for i in l:
    if i[1] == 2:
        ac += 1
    elif i[1] == 1:
        bc += ac
    elif i[1] == 0:
        cc += bc
print cc

Buggy submission (verdict: Runtime Error):


N = int(raw_input())
As = [(int(i), 2) for i in raw_input().split(" ")]
Bs = [(int(i), 1) for i in raw_input().split(" ")]
Cs = [(int(i), 0) for i in raw_input().split(" ")]

l = sorted(As + Bs + Cs)


count = (0, 0, 0, 1)
for i in l:
    count[i[1]] += count[i[1] + 1]
print count[0]

Buggy submission (verdict: Runtime Error):

N = int(raw_input())
As = [(int(i), 2) for i in raw_input().split(" ")]
Bs = [(int(i), 1) for i in raw_input().split(" ")]
Cs = [(int(i), 0) for i in raw_input().split(" ")]

l = sorted(As + Bs + Cs)


count = (0, 0, 0, 1)
for i in l:
    count[i] += count[i + 1]
print count[0]

Buggy submission (verdict: Runtime Error):


N = int(raw_input())
As = [(int(i), 2) for i in raw_input().split(" ")]
Bs = [(int(i), 1) for i in raw_input().split(" ")]
Cs = [(int(i), 0) for i in raw_input().split(" ")]

l = sorted(As + Bs + Cs)


count = (0, 0, 0, 1)
for i in l:
    count[i] += count[i + 1]
print count[0]

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
As = [(int(i), 2) for i in raw_input().split(" ")]
Bs = [(int(i), 1) for i in raw_input().split(" ")]
Cs = [(int(i), 0) for i in raw_input().split(" ")]
l = sorted(As + Bs + Cs, key=lambda x: (x[0],x[1]))
count = (0, 0, 0)
for i in l:
    count[i[1]] += 1 if(i[1] == 2)else count[2] if(i[1] == 1) else count[1]
print count[0]
Problem p03636 (python)

Fixed submission:
inp = raw_input()
print inp[0] + str(len(inp) - 2) + inp[-1]

Buggy submission (verdict: Runtime Error):
str = raw_input()
print str[0] + str(len(str)-2) + str[-1]
Problem p03637 (python)

Fixed submission:
N = int(raw_input())
a = [int(i[-2:])for i in raw_input().split(" ")]

c1 = 0
c2 = 0

for ai in a:
    if ai % 2 != 0:
        c1 += 1
    elif ai % 4 == 0:
        c2 += 1
if c1 <= c2:
    print "Yes"
elif c1 - 1 == c2 and N == c1 + c2:
    print "Yes"
else:
    print "No"

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
a = map(int, raw_input().split(" ")[-2:])

c1 = 0
c2 = 0

for ai in a:
    if ai % 2 != 0:
        c1 += 1
    elif ai % 4 == 0:
        c2 += 1
if c1 <= c2:
    print "Yes"
elif c1 - 1 == c2 and N == c1 + c2:
    print "Yes"
else:
    b = 4/0
    print "No"

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
a = map(int, raw_input().split(" ")[-2:])

c1 = 0
c2 = 0

for ai in a:
    if ai % 2 != 0:
        c1 += 1
    elif ai % 4 == 0:
        c2 += 1
if c1 <= c2:
    print "Yes" if(c1 <= c2)
elif c1 - 1 == c2 and N == c1 + c2:
    print "Yes"
else:
    b = 4/0
    print "No"

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
a = map(int, raw_input().split(" ")[-2:])

c1 = 0
c2 = 0

for ai in a:
    if ai % 2 != 0:
        c1 += 1
    elif ai % 4 == 0:
        c2 += 1
if c1 <= c2:
    print "Yes" if(c1 <= c2)
elif c1 - 1 == c2 and N == c1 + c2
    print "Yes"
else:
    b = 4/0
    print "No"

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
a = map(int, raw_input().split(" ")[-2:])

c1 = 0
c2 = 0

for ai in a:
    if ai % 2 != 0:
        c1 += 1
    if ai % 4 == 0:
        c2 += 1

print "Yes" if(c1 <= c2 || (c1 - 1 == c2 and N == c1 + c2))else "No"
Problem p03545 (python)

Fixed submission:
sr = input()

a, b, c, d = int(sr[0]), int(sr[1]), int(sr[2]), int(sr[3])

def calc(one, two, three):
  if a + one*b + two*c + three*d == 7:
    return True
  else:
    return False
  
def change(num):
  if num == 1:
    return "+"
  else:
    return "-"
  
flag = False
for q in [1, -1]:
  for w in [1, -1]:
    for e in [1, -1]:
      if calc(q, w, e):
        r, t, y = change(q), change(w), change(e)
        print(str(a)+r+str(b)+t+str(c)+y+str(d)+"=7")
        flag = True
        break
    if flag:
      break
  if flag:
    break

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

a, b, c, d = int(sr[0]), int(sr[1]), int(sr[2]), int(sr[3])

def calc(one, two, three):
  if a + b*one + c*two + d*three == 7:
    return True
  else:
    return False
  
def change(num):
  if num == 1:
    return "+"
  else:
    return "-"
  
for q in [1, -1]:
  for w in [1, -1]:
    for e in [1, -1]:
      if calc(q, w, e):
        q, w, e = change(q), change(w), change(e)
        print(str(a)+q+str(b)+w+str(c)+e+str(d)+"=7")
        break
Problem p03556 (python)

Fixed submission:
import sys
import math

n = int(input())

root = math.floor(math.sqrt(n))
print(int(root * root))

Buggy submission (verdict: Runtime Error):
import sys
import math

n = int(raw_input())

root = math.floor(math.sqrt(n))
print(int(root * root))
Problem p03547 (python)

Fixed submission:
X, Y = input().split()
X = int(X, 16)
Y = int(Y, 16)

if X < Y:
    print('<')
elif X > Y:
    print('>')
else:
    print('=')

Buggy submission (verdict: Runtime Error):
X, Y = input().split()
X = int(X, 16)
Y = int(Y, 16)

if A < B:
    print('<')
elif A > B:
    print('>')
else:
    print('=')
Problem p03555 (python)

Fixed submission:
c = input()
c2 = input()

if c[0] == c2[2] and c[1] == c2[1] and c[2] == c2[0]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
def s(n):
    ret = 0
    sn = str(n)
    for c in sn:
        ret += int(c)
    return ret
 
N = int(input())
t = N
 
ans = float('inf')
for i in range(600000):
    t += N
    ans = min(s(t), ans)
 
print(ans)
Problem p03565 (python)

Fixed submission:
S_ = input()
T = input()
a = S_
b = T
def fit(pat, word):
    return all([pi==wi for pi, wi in zip(pat, word) if pi != '?'])

ret = False
for i in reversed(range(len(a)-len(b)+1)):
    if fit(a[i:i+len(b)], b):
        ret = a[:i]+b+a[i+len(b):]
        break    
    
if not ret:
    print('UNRESTORABLE')
elif not '?' in a:
    print(a)
else:
    print(ret.replace('?', 'a'))

Buggy submission (verdict: Runtime Error):
S_ = input()
T = input()
a = S_
b = T
def fit(pat, word):
    return all([pi==wi for pi, wi in zip(pat, word) if pi != '?'])

for i in reversed(range(len(a)-len(b)+1)):
    if fit(a[i:i+len(b)], b):
        ret = a[:i]+b+a[i+len(b):]
        break    
print(ret.replace('?', 'a'))

Buggy submission (verdict: Runtime Error):
S_ = input()
T = input()
a = S_
b = T
def fit(pat, word):
    and([pi==wi for pi, wi in zip(pat, w) if s != '?'])
for i in reversed(range(len(a)-len(b)+1)):
    if fit(a[i:i+len(b)], b):
        ret = a[:i]+b+a[i+len(b):]
    
print(ret.replace('?', 'a')
Problem p03853 (python)

Fixed submission:
H, W = map(int,input().strip().split())
for i in range(H):
  line = input()
  for j in range(2):
  	print(line)

Buggy submission (verdict: Runtime Error):
H, W = map(int,input().strip().split())
for i in range(H):
  line = input()
  for j in range(2):
  print(line)
Problem p04043 (python)

Fixed submission:
ls = input().strip().split()
print('YES' if (ls.count('7') == 1) and (ls.count('5')==2) else 'NO')

Buggy submission (verdict: Runtime Error):
ls = input().strip().split()
return (ls.count('7') == 1) and (ls.count('5')==2)
Problem p03545 (python)

Fixed submission:
s = input()

for bit in range(1 << 3):
    ans = int(s[0])
    f = s[0]

    for i in range(3):
        if bit & (1 << i):
            ans += int(s[i + 1])
            f += "+"
        else:
            ans -= int(s[i + 1])
            f += "-"
        f += s[i + 1]

    if ans == 7:
        print(f + '=7')
        break

Buggy submission (verdict: Runtime Error):
def dfs(i, f, sum):
    if i == 3:
        if sum == 7:
            print(f + "=7")
            exit()
    else:
        dfs(i + 1, f + "+" + s[i + 1], sum + int(s[i + 1]))
        dfs(i + 1, f + "-" + s[i + 1], sum - int(s[i + 1])

s = input()

dfs(0, s[0], int(s[0]))

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

def dfs(i, f, sum):
    if i == 3:
        if sum == 7:
            print(f + "=7")
            exit()
    else:
        dfs(i + 1, f + "+" + s[i + 1], sum + int(s[i + 1]))
        dfs(i + 1, f + "-" + s[i + 1], sum - int(s[i + 1])


dfs(0, s[0], int(s[0]))

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


def dfs(i, f, sum):
    if i == 3:
        if sum == 7:
            print(f + "=7")
            exit()
    else:
        dfs(i + 1, f + "+" + s[i + 1], sum + s[i + 1])
        dfs(i + 1, f + "-" + s[i + 1], sum - s[i + 1])


dfs(0, s[0], int(s[0]))
Problem p03555 (python)

Fixed submission:
a = input()
b = input()
if a[::-1] == b:
    print('YES')
else:
    print('NO')

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

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

ans = 0

for i in range(n):
    for j in range(n):
            for k in range(n):
                if a[i] < b[j] < c[k]:
                    ans = ans + 1

print(ans)
Problem p03759 (python)

Fixed submission:
a,b,c=input().split()
a1=int(a)
b1=int(b)
c1=int(c)
d=b1-a1
e=c1-b1
if d==e:
	print('YES')
else :
	print('NO')

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
a1=int(a)
b1=int(b)
c1=int(c)
d=b1-a1
e=c1-b1
if d==e:
	print('YES')
else :
	print('NO')a,b,c=input().split()
Problem p03548 (python)

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy submission (verdict: Runtime Error):
l = input().split()
print((l[0]-l[2])/(l[1]+l[2]))

Buggy submission (verdict: Runtime Error):
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy submission (verdict: Runtime Error):
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy submission (verdict: Runtime Error):
l = raw_input().split()
print((float(l[0])-float(l[2]))/(float(l[1])+float(l[2])))

Buggy submission (verdict: Runtime Error):
l = raw_input().split()
h = float(l[0])/(float(l[1])+float(l[2]))
print(int(h-1))

Buggy submission (verdict: Runtime Error):
l = raw_input().split()
h = int(l[0])/(int(l[1])+int(l[2]))
print(h)

Buggy submission (verdict: Runtime Error):
l = raw_input().split()
h = int(l[0])/(int(l[1])+int(l[2]))
print(h)
Problem p03548 (python)

Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
 
import math
import re
import sys
 
args = input().split()

X = args[0]
Y = args[1]
Z = args[2]
 
# 人数
a = (int(X)-int(Z))/(int(Y)+int(Z))
 
print(int(a))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8

import math
import re
import sys
 
args = sys.argv

X = args[0]
Y = args[1]
Z = args[2]

# 人数
a = (X-Z)/(Y+Z)

print(int(a))

Buggy submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8

import math
import re
import sys
 
args = sys.argv

if __name__ == "__main__":
	X = args[1]
	Y = args[2]
	Z = args[3]
	# 人数
	a = (X-Z)/(Y+Z)

	int(a)
Problem p03597 (python)

Fixed submission:
N = int(input())
A = int(input())
print(N * N - A)

Buggy submission (verdict: Runtime Error):
N,A = map(int,input().split())
print(N * N - A)
Problem p03777 (python)

Fixed submission:
A,B = map(str,input().split())
if A == "H" and B == "H":
    print("H")
elif A == "H" and B == "D":
    print("D")
elif A == "D" and B == "H":
    print("D")
else:
    print("H")

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A == "H" and B == "H":
    print("H")
elif A == "H" and B == "D":
    print("D")
elif A == "D" and B == "H":
    print("D")
else:
    print("H")
Problem p03547 (python)

Fixed submission:
X, Y = input().split()
X, Y = int(X, 16), int(Y, 16)

if X < Y:
    print("<")
elif X > Y:
    print(">")
else:
    print("=")

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

print((1900 * M + 100 * (N - M)) * 2**M)
Problem p03573 (python)

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

if A == B:
    print(C)
elif B == C:
    print(A)
elif C == A:
    print(B)

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

ans = []
for i in S:
    ans.append(list(i))

dxy = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1)]

for y in range(H):
    for x in range(W):
        if S[y][x] == '#':
            continue
        c = 0
        for dx, dy in dxy:
            if x + dx < 0 or x + dx > W - 1 or y + dy < 0 or y + dy > H - 1:
                continue
            if S[y + dy][x + dx] == '#':
                c += 1
        ans[y][x] = c

for row in ans:
    print(''.join(list(map(str, row))))
Problem p03574 (python)

Fixed submission:
H, W = map(int, input().split())
S = [input() for i in range(H)]

ans = []
for i in S:
    ans.append(list(i))

dxy = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1)]

for y in range(H):
    for x in range(W):
        if S[y][x] == '#':
            continue
        c = 0
        for dx, dy in dxy:
            if x + dx < 0 or x + dx > W - 1 or y + dy < 0 or y + dy > H - 1:
                continue
            if S[y + dy][x + dx] == '#':
                c += 1
        ans[y][x] = c

for row in ans:
    print(''.join(list(map(str, row))))

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

ans = []
for row in src:
    ans.append(list(row))

dxy = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1)]
for y in range(H):
    for x in range(W):
        if src[y][x] == '#':
            continue
        c = 0
        for dx,  dy in dxy:
            if x + dx < 0 or x + dx > W - 1 or y + dy < 0 or y + dy > H - 1:
                continue
            if src[y + dy][x + dx] == '#':
                c += 1
        ans[y][x] = c


for row in ans:
    print(''.join(list(map(str, row))))
Problem p03547 (python)

Fixed submission:
list = input().split()
x = list[0]
y = list[1]
dic = {"A":10,
"B":11,
"C":12,
"D":13,
"E":14,
"F":15}
x = dic[x]
y = dic[y]

if x > y:
    print(">")
elif x == y:
    print("=")
else:
    print("<")

Buggy submission (verdict: Runtime Error):
list = input().split()
x,y,z = list[0],list[1],list[2]
num = x%(y+z)
if num >= y:
    print((x/(y+z))+1)
else:
    print(x/(y+z))
Problem p03548 (python)

Fixed submission:
list = input().split()
x,y,z = int(list[0]),int(list[1]),int(list[2])
x -= z * 2
num = x % (y+z)
if num >= y:
    print((x//(y+z))+1)
else:
    print(x//(y+z))

Buggy submission (verdict: Runtime Error):
list = input().split()
x,y,z = list[0],list[1],list[2]
x -= z * 2
num = x % (y+z)
if num >= y:
    print((x//(y+z))+1)
else:
    print(x//(y+z))

Buggy submission (verdict: Runtime Error):
list = input().split()
x,y,z = list[0],list[1],list[2]
num = x%(y+z)
if num >= y:
    print((x/(y+z))+1)
else:
    print(x/(y+z))
Problem p03555 (python)

Fixed submission:
import sys

line1 = sys.stdin.readline().rstrip()
line2 = sys.stdin.readline().rstrip()

len2 = len(line2)

res = True

for i in range(0, len(line1)):
    if line2[len2-1 - i] != line1[i]:
        res = False
        print("NO")
        break

if res == True:
    print("YES")

Buggy submission (verdict: Runtime Error):
line1 = sys.stdin.readline().rstrip()
line2 = sys.stdin.readline().rstrip()

len2 = len(line2)

res = True

for i in range(0, len(line1)):
    if line2[len2-1 - i] != line1[i]:
        res = False
        print("NO")
        break

if res == True:
    print("YES")
Problem p03563 (python)

Fixed submission:
import sys

cur = sys.stdin.readline()
target = sys.stdin.readline()

a = int(target) * 2 - int(cur)

print (a)

Buggy submission (verdict: Runtime Error):
from sys import stdin

curRate = stdin.readline()
targetRate = stdin.readline()

a = targetRate * 2 - curRate

print(a)

Buggy submission (verdict: Runtime Error):
from sys import stdin

curRate = stdin.readline()
targetRate = stdin.readline()

a = targetRate * 2 - curRate

print(a)
Problem p03838 (python)

Fixed submission:
a, b = map(int,input().split())
x, y = abs(a), abs(b)

if a >= 0:
    if b > 0:
        if a > b:
            ans = abs(x-y) + 2
        else:
            ans = abs(x-y)
            
    else:
        ans = abs(x-y) + 1

else:
    if b >= 0:
        ans = min(abs(x-y)+1, b - a)
    else:
        if b > a:
            ans = abs(x-y)
        else:
            ans = abs(x-y) + 2

print(ans)

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

if a >= 0:
    if b > 0:
        if a > b:
            a, b = map(int,input().split())
x, y = abs(a), abs(b)

if a >= 0:
    if b > 0:
        if a > b:
            ans = abs(x-y) + 2
        else:
            ans = abs(x-y)
            
    else:
        ans = abs(x-y) + 1

else:
    if b >= 0:
        ans = min(abs(x-y)+1, b - a)
    else:
        if b > a:
            ans = abs(x-y)
        else:
            ans = abs(x-y) + 2

print(ans)
Problem p03826 (python)

Fixed submission:
li = list(map(int,input().split()))
A = li[0]
B = li[1]
C = li[2]
D = li[3]

if A * B > C * D:
  print(A * B)
elif A * B < C * D:
  print(C * D)
else:
  print(A * B)

Buggy submission (verdict: Runtime Error):
li = list(map(int,input().split()))
A = li[0]
B = li[1]
C = li[2]
D = li[3]

if A * B > C * D:
  print(A * B)
elif A * B < C * D:
  print(C * D)
else
  print(A * B)
Problem p03555 (python)

Fixed submission:
s = input()
t = input()
if s[0]==t[2] and s[1]==t[1] and s[2]==t[0]:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
x=input()
if x[0][0]==x[1][2] & x[0][1]==x[1][1] & x[0][2]==x[1][0]
    print YES
else
	print NO
end
Problem p03555 (python)

Fixed submission:
c_11, c_12, c_13 = input()
c_21, c_22, c_23 = input()
if c_11 == c_23 and c_12 == c_22 and c_13 == c_21:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
c_11, c_12, c_13 = input()
c_21, c_22, c_23 = input()
if c_11 == c_23 and c_12 == c_22 and c_13 == c_21:
  print(YES)
else:
  print(NO)
Problem p03635 (python)

Fixed submission:
n, m = map(int, input().split())
print((n-1)*(m-1))

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

a =( (n - 1) * (m - 1))

print(a)

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

a = (n - 1) * (m - 1)

print(a)
Problem p03729 (python)

Fixed submission:
def solve():
    a, b, c = map(str, input().split())
    if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
        ans = "YES"
    else:
        ans = "NO"

    print(ans)

if __name__ == '__main__':
   solve()

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print(’YES’)
else:
print(’NO’)
Problem p03737 (python)

Fixed submission:
def solve():
    a, b, c = map(str, input().split())
    

    print (a[0].upper() + b[0].upper() + c[0].upper())


if __name__ == '__main__':
   solve()

Buggy submission (verdict: Runtime Error):
s1 = input()
s2 = input()
s3 = input()

print (s1[0].upper() + s2[0].upper() + s3[0].upper())

Buggy submission (verdict: Runtime Error):
s1 = input()
s2 = input()
s3 = input()

print (s1[0].upper() + s2[0].upper() + s3[0].upper())
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
print(int((a + b) * h / 2))

Buggy submission (verdict: Runtime Error):
def solve():
    a, b, c = map(int, input().split())
    print((a + b)*c/2)

if __name__ == '__main__':
    solve()