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

Fixed submission:
a = input().split("/")
if int(a[1]) < 4:
  print("Heisei")
elif int(a[1]) == 4 and int(a[2]) <= 30:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
a = input().split()
if int(a[6]) < 4:
  print("Heise")
elif int(a[6]) == 4 and int(a[8]) < 3:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
a = input().split()
if a[6] < 4:
  print("Heisei")
elif a[6] == 4 and a[8] < 3:
  print("Heisei")
else:
  print("TBD")
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if ((a*b) % 2) == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
import sys
a, b = sys.stdin.readlines()
c = a*b
if (c % 2) == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
import sys
a, b = sys.stdin.readline()
c = a*b
if (c % 2) == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
input1 = int(input())
input2 = int(input())
result = input1 * input2
if (result % 2) == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a,b = int(input())
c = a*b
if (c % 2) == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = a*b
if (c%2) == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = a*b
if (c%2) == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = a*b
if (c%2) == 0:
    print("Even")
else:
    print("Odd")
Problem p03128 (python)

Fixed submission:
inf = float("inf")
N, M = map(int, input().split())
A = map(int, input().split())
C = [2, 5, 5, 4, 5, 6, 3, 7, 6]
costs = {m: C[m - 1] for m in A}
dp = [0]
for i in range(1, N + 1):
    dp.append(
        max([dp[i - c] if i - c >= 0 else -inf for c in costs.values()]) + 1)

digits = list(costs.keys())
digits = sorted(digits, reverse=True)
num = N
result = []
for _ in range(dp[N]):
    for digit in digits:
        if num >= costs[digit] and dp[num - costs[digit]] != -inf and dp[num - costs[digit]] == dp[num] - 1:
            result.append(str(digit))
            num -= costs[digit]
            break
print("".join(result))

Buggy submission (verdict: Runtime Error):
inf = float("inf")
N, M = map(int, input().split())
A = map(int, input().split())
C = [2, 5, 5, 4, 5, 6, 3, 7, 6]
costs = {m: C[m - 1] for m in A}
dp = [0]
for i in range(1, N + 1):
    dp.append(
        max([dp[i - c] if i - c >= 0 else -inf for c in costs.values()]) + 1)

digits = list(costs.keys())
digits = sorted(digits, reverse=True)
num = N
result = []
for _ in range(dp[N]):
    for digit in digits:
        if dp[num - costs[digit]] != -inf and dp[num - costs[digit]] == dp[num] - 1:
            result.append(str(digit))
            num -= costs[digit]
            break
print("".join(result))
Problem p03262 (python)

Fixed submission:
def gcd(x, y):
    while y != 0:
        temp = y
        y = x % y
        x = temp
    return x


N, X = map(int, input().split())

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

dist_list = [abs(X - e) for e in x]

ans = dist_list[0]
for e in dist_list:
    ans = gcd(ans, e)


print(ans)

Buggy submission (verdict: Runtime Error):
import fraction

N, X = map(int, input().split())

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

dist_list = [abs(X - e) for e in x]
ans = dist_list[0]
for e in dist_list:
    ans = fraction.gcd(e, ans)


print(ans)

Buggy submission (verdict: Runtime Error):
import math


N, X = map(int, input().split())

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

dist_list = [abs(X - e) for e in x]
ans = dist_list[0]
for e in dist_list:
    ans = math.gcd(e, ans)


print(ans)

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


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


N, X = map(int, input().split())

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

dist_list = [abs(X - e) for e in x]

print(gcd_list(dist_list))
Problem p03290 (python)

Fixed submission:
D, G = map(int, input().split())
P = []
C = []
for i in range(D):
    p, c = map(int, input().split())
    P.append(p)
    C.append(c)


def bit_search(A):
    result = []
    for i in range(1 << len(A)):
        output = []
        for j in range(len(A)):
            if ((i >> j) & 1) == 1:
                output.append(A[j])
        result.append(output)

    return result


search_list = bit_search(list(range(D)))
ans = 10 ** 9
for complete_list in search_list:
    score = sum([100 * (i + 1) * P[i] + C[i] for i in complete_list])
    count = sum([P[i] for i in complete_list])
    if score >= G:
        ans = min(ans, count)
    else:
        j_max = max([i for i in range(D) if i not in complete_list])
        required = -(-(G - score) // (100 * (j_max + 1)))
        if required < P[j_max]:
            count += required
            ans = min(ans, count)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
D, G = map(int, input().split())
P = []
C = []
for i in range(D):
    p, c = map(int, input().split())
    P.append(p)
    C.append(c)

used = [False for i in range(D)]


def check_goal(P, C, rest):
    result = []
    for i in range(len(P)):
        if used:
            continue
        if rest < 100 * (i + 1) * P[i]:
            result.append(math.ceil(rest // 100 * (i + 1)))
        elif rest <= 100 * (i + 1) * P[i] + C[i]:
            result.append(P[i])
        else:
            result.append(float("inf"))
    return result


def get_scores_best(P, C, rest):
    scores = [(100 * (i + 1), i) if 100 * (i + 1) * P[i] > rest else (100 *
                                                                      (i + 1) + C[i] / P[i], i) for i in range(len(P))]
    scores.sort(key=lambda x: x[0])
    scores.reverse()
    while True:
        j = 0
        if used[scores[j][1]]:
            j += 1
            continue
        else:
            return scores[j]


def judge(P, C, G):
    rest = G
    count = 0
    while True:
        count_list = check_goal(P, C, rest)
        if min(count_list) != float("inf"):
            count += min(count_list)
            return count
        else:
            score, i = get_scores_best(P, C, rest)
            count += P[i]
            rest -= 100 * (i + 1) * P[i] + C[i]
            print(rest)
            used[i] = True


print(judge(P, C, G))
Problem p03407 (python)

Fixed submission:
A, B, C = map(int, input().split())
if A + B < C:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
if A + B < C:
    print("No")
else:
    print("Yes")
Problem p03425 (python)

Fixed submission:
from functools import reduce
from itertools import combinations
N = int(input())
S = {"M": [], "A": [], "R": [], "C": [], "H": []}
for _ in range(N):
    i = input()
    head = i[0]
    if head == "M":
        S["M"].append(i)
    elif head == "A":
        S["A"].append(i)
    elif head == "R":
        S["R"].append(i)
    elif head == "C":
        S["C"].append(i)
    elif head == "H":
        S["H"].append(i)
counter = [len(S[head]) for head in list("MARCH") if len(S[head]) != 0]
combs = list(combinations(counter, 3))
ans = sum([reduce(lambda x, y: x * y, e) for e in combs])
print(ans)

Buggy submission (verdict: Runtime Error):
from functools import reduce
from itertools import combinations
N = int(input())
S = {"M": [], "A": [], "R": [], "C": [], "H": []}
for _ in range(N):
    i = input()
    head = i[0]
    if head == "M":
        S["M"].append(i)
    elif head == "A":
        S["A"].append(i)
    elif head == "R":
        S["R"].append(i)
    elif head == "C":
        S["C"].append(i)
    elif head == "H":
        S["H"].append(i)
result = [len(S[head]) for head in list("MARCH") if len(S[head]) != 0]

ans = sum([reduce(lambda x, y: x * y, list(combinations(result, 3))[i])
           for i in range(len(result))])
print(ans)

Buggy submission (verdict: Runtime Error):
from functools import reduce
from itertools import combinations
N = int(input())
S = {"M": set([]), "A": set([]), "R": set([]), "C": set([]), "H": set([])}
for _ in range(N):
    i = input()
    head = i[0]
    if head == "M":
        S["M"].add(i)
    elif head == "A":
        S["A"].add(i)
    elif head == "R":
        S["R"].add(i)
    elif head == "C":
        S["C"].add(i)
    elif head == "H":
        S["H"].add(i)
result = [len(S[head]) for head in list("MARCH") if len(S[head]) != 0]

ans = sum([reduce(lambda x, y: x * y, list(combinations(result, 3))[i])
           for i in range(len(result))])
print(ans)
Problem p03557 (python)

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


def hoge():
    count = 0
    Ai = -1
    Ci = -1
    for i in range(N):
        if Ai < N - 1:
            while A[Ai + 1] < B[i]:
                Ai += 1
                if Ai == N - 1:
                    break
        if Ci < N - 1:
            while C[Ci + 1] <= B[i]:
                Ci += 1
                if Ci == N - 1:
                    break
        count += (Ai + 1) * (N - (Ci + 1))
    return count


print(hoge())

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

    count = 0
    Ai = -1
    Ci = -1
    for i in range(N):
        if Ai < N - 1:
            while A[Ai + 1] < B[i]:
                Ai += 1
                if Ai == N - 1:
                    break
        if Ci < N - 1:
            while C[Ci + 1] <= B[i]:
                Ci += 1
                if Ci == N - 1:
                    break
        count += (Ai + 1) * (N - (Ci + 1))

    return count
Problem p03633 (python)

Fixed submission:
from functools import reduce
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))


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


def lcm(a, b):
    if b > a:
        b, a = a, b
    return a * b // gcd(a, b)


x = reduce(lcm, T)
print(x)

Buggy submission (verdict: Runtime Error):
from functools import reduce
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))


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


def lcm(a, b):
    if b > a:
        b, a = a, b
    return int(a * b / gcd(a, b))


x = reduce(lcm, T)
print(x)

Buggy submission (verdict: Runtime Error):
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))


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


def lcm(a, b):
    if a > b:
        g = gcd(a, b)
        return int(a / g * b)
    else:
        g = gcd(b, a)
        return int(b / g * a)


x = T[0]
for i in range(1, N):
    x = lcm(x, T[i])

print(x)

Buggy submission (verdict: Runtime Error):
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))


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


def lcm(a, b):
    if a > b:
        g = gcd(a, b)
    else:
        g = gcd(b, a)
    return int(a / g * b)


x = T[0]
for i in range(1, N):
    x = lcm(x, T[i])

print(x)

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


def lcm(a, b):
    g = math.gcd(a, b)
    return int(a / g * b)


x = T[0]
for i in range(1, N):
    x = lcm(x, T[i])

print(int(x))
Problem p03635 (python)

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

Buggy submission (verdict: Runtime Error):
n.m = map(int, input().split())
print((n - 1) * (m - 1))
Problem p03105 (python)

Fixed submission:
[A,B,C] = list(map(int,input().split()))
print(min(C,B//A))

Buggy submission (verdict: Runtime Error):
[A,B,C]=list(map(int,input().sprit))

print(min(C,B//A))
Problem p03860 (python)

Fixed submission:
a,b,c=map(str,input().split())
print('A'+b[0]+'C')

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

print('A'b[0]'C')
Problem p04033 (python)

Fixed submission:
a,b=map(int,input().split())
if b < 0:
    if (b-a+1) % 2 == 0:
        ans = 'Positive'
    elif (b-a+1) % 2 == 1:
        ans = 'Negative'
elif a > 0:
 ans='Positive'
else:
 ans='Zero'
  
print(ans)

Buggy submission (verdict: Runtime Error):
a, b = map(int,input().split())
if b < 0:
    if (b-a+1) % 2 == 0:
        ans = 'Positive'
    elif (b-a+1) % 2 == 1:
        ans = 'Negative'
        
elif a > 0:
     ans='Positive'
else
     ans='Zero'
  
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if b < 0:
    if (b-a+1) % 2 == 0:
        ans = 'Positive'
    elif (b-a+1) % 2 == 1:
        ans = 'Negative'
elif a > 0:
 ans='Positive'
else
 ans='Zero'
  
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
if b < 0:
    if (b-a+1) % 2 == 0:
        ans = 'Positive'
    elif (b-a+1) % 2 == 1:
        ans = 'Negative'
elif a > 0:
 ans='Positive'
else
 ans='Zeros'
  
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if b < 0:
    if (b-a+1) % 2 == 0:
        ans = 'Positive'
    elif (b-a+1) % 2 == 1:
        ans = 'Negative'
elif a > 0:
 ans='Positive'
else
 ans='Zeros'
  
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a*(a+1)*b==0:
  print('Zero')
if a*(a+1)*b<0:
  print('Negative')
if a*(a+1)*b>0:
  print('Positive')

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a*b==0:
  print('Zero')
if a*b<0:
  print('Negative')
if a*b>0:
  print('Positive')
Problem p03214 (python)

Fixed submission:
from statistics import mean

frame_num = int(input())
frame_value = list(map(int, input().split()))
avg = mean(frame_value)
min_frame = max(frame_value)
thumbanil = 0
for frame, value in enumerate(frame_value):
    diff = abs(avg - value)
    # print(diff, value, frame)
    if diff < min_frame:
        min_frame = diff
        thumbanil = frame

print(thumbanil)

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

count, sum, start = 0, 0, 0
substring = []
while (True):
    sum += input[count]
    substring.append(sum)
    if start == len(input) - 1:
        break
    if count == len(input) - 1:
        start += 1
        count = start
        sum = 0
        continue

    count += 1
substring.sort(reverse=True)

result = substring[0]
for i in range(1, K):
    result = result & substring[i]

print(result)
Problem p03076 (python)

Fixed submission:
import numpy as np

nums = []
sortedNums = [0,0,0,0,0]
sortedRemainders = [0,0,0,0,0]
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	if nums[i] % 10 == 0:
		remainders[i] = 10
	else:
		remainders[i] = nums[i] % 10

sortedRemaindersIndex = np.ndarray.tolist(np.argsort(remainders))

for i in range(5):
	sortedNums[i] = nums[sortedRemaindersIndex[i]]

elapsedTime = 0
for i in range(4):
	if sortedNums[i+1] % 10 == 0:
		elapsedTime += sortedNums[i+1]
	else:
		elapsedTime += sortedNums[i+1] + 10 - sortedNums[i+1] % 10

elapsedTime += sortedNums[0]

print(elapsedTime)

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

minimumCapacity = 10.0**16

for i in range(5):
	vehicleCapacity = int(input())
	minimumCapacity = min(minimumCapacity, vehicleCapacity)

bottleNeckTime = numberOfToorists / minimumCapacity
if numberOfToorists % minimumCapacity > 0:
	bottleNeckTime += 1

requiredTime = bottleNeckTime + 4

print(requiredTime)

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

nums = []
sortedNums = [0,0,0,0,0]
sortedRemainders = [0,0,0,0,0]
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	if nums[i] % 10 == 0:
		remainders[i] = 10
	else:
		remainders[i] = nums[i] % 10

sortedRemaindersIndex = np.ndarray.tolist(np.argsort(remainders))

for i in range(5):
	sortedNums[i] = nums[sortedRemaindersIndex[i]]

elapsedTime = 0
for i in range(4):
	if sortedNums%10 == 0:
		elapsedTime += sortedNums[i]
	else:
		elapsedTime += (sortedNums[i]/10 +1) * 10

elapsedTime += sortedNums[0]

print(elapsedTime)

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

nums = []
sortedNums = [0,0,0,0,0]
sortedRemainders = [0,0,0,0,0]
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	if nums[i] % 10 == 0:
		remainders[i] = 10
	else:
		remainders[i] = nums[i] % 10

sortedRemaindersIndex = np.ndarray.tolist(np.argsort(remainders))

for i in range(5):
	sortedNums[i] = nums[sortedRemaindersIndex[i]]

elapsedTime = 0
for i in range(4):
	if sortedNums%10 == 0:
		elapsedTime += sortedNums[i]
	else:
		elapsedTime += (sortedNums[i]/10 +1) * 10

elapsedTime += sortedNums[0]

print(elapsedTime)

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

nums = []
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	remainders[i] = nums[i] % 10

sortedRemainders = np.argsort(remainders)

for i in range(5):
	sortedNums[i] = nums[sortedRemainders[i]]

elapsedTime = 0
for i in range(4):
	if sortedRemainders[i] == 0:
		elapsedTime += sortedNums[i]
	else:
		elapsedTime += sortedNums[i] + 10 - sortedRemainders

elapsedTime += sortedNums[4]

print(elapsedTime)
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
a == 1
b == 1
for i in range(100):
	a = a + i
    for j in range(100):
		b = b + j
		c = (a-1) * (b-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
for 2 in range(100):
	c = (a-1) * (b-1)
Problem p03284 (python)

Fixed submission:
N,K=map(int, input().split())
if N % K == 0:
 print(0)
else:
 print(1)

Buggy submission (verdict: Runtime Error):
N,K=map(int, input().split())
if N % K = 0:
 print(0)
else:
 print(1)

Buggy submission (verdict: Runtime Error):
N,K=map(int, inpu().split())
if N % K = 0:
 print(0)
else:
 print(1)
Problem p03308 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
print(max(A)-min(A))

Buggy submission (verdict: Runtime Error):
H = list(map(int, input().split())
print(max(H)-min(H))
Problem p03085 (python)

Fixed submission:
b=input()
 
if b=='A':
    print('T')
elif b=='T':
    print('A')
elif b=='G':
    print('C')
else:
    print('G')

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

if b='A':
  print('T')
elif b='T':
  print('A')
elif b='G':
  print('C')
else:
  print('G')

Buggy submission (verdict: Runtime Error):
b=input()
if b=A:
  print("T")
if b=T:
  print("A")
if b=C: 
  print("G")
if b=G: 
  print("C")

Buggy submission (verdict: Runtime Error):
b=input()
if b=A:
  print("T")
if b=T:
  print("A")
if b=C: 
  print("G")
if b=G  
  print("C")

Buggy submission (verdict: Runtime Error):
b=int(input())
if b=A:
  print(T)
if b=T:
  print(A)
if b=C: 
  print(G)
if b=G  
  print(C)
Problem p03101 (python)

Fixed submission:
a=list(map(int,input().split()))
b=list(map(int,input().split()))
print((a[0]-b[0])*(a[1]-b[1]))

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()))
b=list(map(int,input().split()))
print(a[0]-b[0])*(a[1]-b[1])

Buggy submission (verdict: Runtime Error):
a=list(int(input().split()))
b=list(int(input().split()))
print(a[0]-b[0])*(a[1]-b[1])

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

s=(a[0]-b[0])*(a[0]-b[0])
print(s)

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

s=(a[0]-b[0])*(a[1]-b[1])
print(s)
Problem p03105 (python)

Fixed submission:
a=list(map(int, input().split()))
 
if a[1]/a[0]>=a[2]:
    print(a[2])
else:
    print(a[1]//a[0])

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

if a[1]//a[0]>=a[2]:
    print(a[2])
else:
    print(a[1]//a[0])
Problem p03076 (python)

Fixed submission:
a =int(input())
b =int(input())
c =int(input())
d =int(input())
e =int(input())
sample_list = []
sample_list.append(a)
sample_list.append(b)
sample_list.append(c)
sample_list.append(d)
sample_list.append(e)
x = []
for i in sample_list:
  if i%10 == 0:
    x.append(0)
  else:
    x.append(10-(i%10))
print(sum(sample_list)+sum(x)-max(x))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

sample_list = []
sample_list.append(a)
sample_list.append(b)
sample_list.append(c)
sample_list.append(d)
sample_list.append(e)

x = []
for i in sample_list:
  if i%10 == 0:
    x.append(0)
  else:
    x.append(10-(i%10))

print(sum(sample_list)+sum(x)-max(x))

Buggy submission (verdict: Runtime Error):
a =int(input())
b =int(input())
c =int(input())
d =int(input())
e =int(input())
sample_list = []
sample_list.append(a)
sample_list.append(b)
sample_list.append(c)
sample_list.append(d)
sample_list.append(e)
x = []
for i in sample_list:
  if i%10 == 0:
    x.append(0)
  else:
    x.append(10-(i%10))
print(sam(sample_list)+sam(x)-max(x))

Buggy submission (verdict: Runtime Error):
a =int(input())
b =int(input())
c =int(input())
d =int(input())
e =int(input())
sample_list = []
sample_list.append(a)
sample_list.append(b)
sample_list.append(c)
sample_list.append(d)
sample_list.append(e)
x = []
for i in sample_list:
  if i%10 = 0:
    x.append(0)
  else:
    x.append(10-(i%10))
print(sam(sample_list)+sam(x)-max(x))
Problem p03085 (python)

Fixed submission:
b = input()
if(b == "A"):
  print("T")
elif(b == "T"):
  print("A")
elif(b == "C"):
  print("G")
else:
  print("C")

Buggy submission (verdict: Runtime Error):
b = input()
if(b == "A"):
  print("T")
elif(b == "T"):
  print("A")
elif(b == "C"):
  print("G"):
else:
  print("C")
Problem p03086 (python)

Fixed submission:
S = input()
gene = ['A','T','C','G']

length = len(S)
ans = 0
tmp = 0

for i in range(length):
  if S[i] in gene:
    tmp += 1
  else:
    tmp = 0
  if tmp >= ans:
    ans = tmp
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
gene = ['A','T','C','G']

length = len(S)
ans = 0
tmp = 0

for i in range(length):
  if s[i] in gene:
    tmp += 1
  else:
    tmp = 0
  if tmp >= ans:
    ans = tmp
print(ans)
Problem p03105 (python)

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

ans = min(C,B//A)
print(ans)

Buggy submission (verdict: Runtime Error):
A,B,C = map(int,input().split())
print(if(B/A <= C)int(B/A) else(int(C))
Problem p03106 (python)

Fixed submission:
a,b,k = map(int,input().split())
m = min(a,b)
count = 0
for i in range(m,0,-1):
  if i == 0:
    break
  if a%i == 0 and b%i == 0:
    count += 1
  if count == k:
    break
print(i)

Buggy submission (verdict: Runtime Error):
a,b,k = map(int,input().split())
m = min(a,b)
count = 0
for i in range(m,0,-1):
  if i == 0 :
    break:
  if a%i == 0 and b%i == 0:
    count += 1
  if count == k:
    break:
print(i)
Problem p03109 (python)

Fixed submission:
_,m,_ = map(int,input().split("/"))
print("TBD" if m > 4 else "Heisei")

Buggy submission (verdict: Runtime Error):
S = input()
print("HEISEI" if S <= 2019/4/30 else "TBD")

Buggy submission (verdict: Runtime Error):
S = input()
print("HEISEI" if(S <= 2019/4/30) else "TBD")
Problem p03110 (python)

Fixed submission:
n = int(input())
sum_money = 0
for i in range(n):
  x,u = input().split()
  int_x = float(x)
  
  if u == 'BTC':
    int_x *= 380000.0
  sum_money += int_x
print(sum_money)

Buggy submission (verdict: Runtime Error):
n = int(input())
sum_money = 0
for i in range(n):
  x,u = map(input())
  int_x = float(x)
  
  if u == 'BTC':
    int_x *= 380000.0
  sum_money += int_x
print(sum_money)
Problem p03125 (python)

Fixed submission:
A, B = map(int,input().split())
if(B%A == 0):
  print(A+B)
else:
  print(B-A)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if(B%A == 0):
  print(A+B)
else:
  print(B-A)