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

Fixed submission:
a = [int(input()) for i in range(5)]
m = 0
n = 0
for i in a:
  if i%10 != 0:
    t = 10 - i%10
  else:
    t = 0
  n += i + t
  m = max(m,t)
print(n-m)

Buggy submission (verdict: Runtime Error):
a = [int(input) for i in range(5)]
m = 0
n = 0
for i in a:
  if i%10 != 0:
    t = 10 - i%10
  else:
    t = 0
  n += i + t
  m = max(m,t)
print(n-m)
Problem p03110 (python)

Fixed submission:
a = 0
for i in range(int(input())):
  v,u = input().split()
  if u == "JPY":
    a += int(v)
  else:
    a += float(v)*380000
print(a)

Buggy submission (verdict: Runtime Error):
a = 0
for i in range(int(input())):
  v,u = input().split()
  if u == "JPY":
    a += int(v)
  else:
    a += int(v)*380000
print(a)
Problem p03220 (python)

Fixed submission:
N = int(input())
T,A = map(int,input().split())
H = [int(i) for i in input().split()]
for i in range(N):
  H[i] = abs(T - H[i] * 0.006 - A)
print(H.index(min(H))+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
T,A = map(int,input().split())
H = [int(i) for i in input().split()]
for i in range(N):
  H[i] = abs(T - H[i] * 0.006 - A)
print(H.index(min[H])+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
T,A = map(int,input().split())
H = [int(i) for i in input().split()]
for i in range(len(H)):
  H[i] = abs(T - H[i] * 0.006 - A)
print(H.index(min[H])+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
T,A = map(int,input().split())
H = [int(i) for i in input().split()]
for i in range(len(H)):
  H[i] = T - H[i] * (0.006 - 1)
print(H[min(H)]+1)
Problem p03370 (python)

Fixed submission:
N,X = map(int,input().split())
m = []
for i in range(N):
  m.append(int(input()))
print(N+int((X-sum(m))/min(m)))

Buggy submission (verdict: Runtime Error):
a = input().split("\n")
N,X = map(int,a[0].split())
m = list(int(i) for i in a.pop(0))
print(N+int((X-sum(m))/min(m)))
Problem p03386 (python)

Fixed submission:
A,B,K = map(int,input().split())
for i in sorted(set(range(A,B+1)[:K])|set((range(A,B+1)[-1*K:]))):
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = list(map(int,input().split()))
for i in list(range(A,B+1))[:K] + list(range(A,B+1))[(-1*K):]:
    print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = list(map(int,input().split()))
for i in list(range(A,B+1))[:K] + list(range(A,B+1))[-1*K:]:
    print(i)
Problem p03101 (python)

Fixed submission:
H,W = map(int,input().split(" "))
h,w = map(int,input().split(" "))

print((H-h)*(W-w))

Buggy submission (verdict: Runtime Error):
H,W = input().split(" ")
h,w = input().spplit(" ")

print((H-h) * (W-w))
Problem p03210 (python)

Fixed submission:
X = int(input())

sft = [3,5,7]

if X in sft:
  print("YES")
else:
  print("NO")

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

sft = [3,5,7]

if x in sft:
  print("YES")
else:
  print("NO")
Problem p03071 (python)

Fixed submission:
x,y = map(int,input().split())
if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

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

if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

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

if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))

Buggy submission (verdict: Runtime Error):
x = int(raw_input())
y = int(raw_input())

if x>y:
  print(int(2*x-1))
elif x<y:
  print(int(2*y-1))
elif x == y:
  print(int(x+y))
Problem p03071 (python)

Fixed submission:
a,b=map(int,input().split())
coins = [a+b,2*a-1,2*b-1]
print(max(coins))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
coins = [a+b,2a-1,2b-1]
print(max(coins))
Problem p03085 (python)

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

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
l = [0] * q
r = [0] * q
for i in range(0, q):
    l[i], r[i] = map(int, input().split())
ac_index = [False] * n
for i in range(n - 1):
    if s[i] + s[i + 1] == 'AC':
        ac_index[i] = True
for i in range(0, q):
    count = 0;
    for j in range(l[i] - 1, r[i] - 1):
        if ac_index[j]:
            count += 1
    print(count)
Problem p03087 (python)

Fixed submission:
n, q = map(int, input().split())
s = ' ' + input()
heap = [0] * (n + 1)
cnt = 0
for i in range(2, n + 1):
    if s[i - 1] == 'A' and s[i] == 'C':
        cnt += 1;
    heap[i] = cnt
ans = []
for i in range(q):
    l, r = map(int, input().split())
    ans.append(heap[r] - heap[l])
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
l = [0] * q
r = [0] * q
for i in range(0, q):
    l[i], r[i] = map(int, input().split())
ac_index = []
k = 0
while(k < n - 1):
    while(s[k] != 'A'):
        k += 1
    k += 1
    if s[k] == 'C':
        ac_index.append(k - 1)
    k += 1

for i in range(0, q):
    count = 0;
    for j in ac_index:
        if l[i] - 1 <= j <  r[i] - 1:
            count += 1
    print(count)

Buggy submission (verdict: Runtime Error):
from pip._vendor.pep517.check import ansi
n, q = map(int, input().split())
s = input()
ans = []
for i in range(0, q):
    l, r = map(int, input().split())
    ans.append(s[l-1: r].replace('AC', ' ').count(' '))
for i in ans:
    print(i)
Problem p03105 (python)

Fixed submission:
a,b,c = map(int,input().split())
print(c if a*c < b else b//a)

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
i = a + 1 if a <= b else b + 1
count = 0
while count < k:
    i -= 1
    if a % i == 0 and b % i == 0:
        count += 1
print(i)
Problem p03110 (python)

Fixed submission:
n = int(input())
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)

Buggy submission (verdict: Runtime Error):
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)

Buggy submission (verdict: Runtime Error):
cnt = 0
for i in range(n):
    x, u = input().split()
    cnt += float(x) * (1 if u == 'JPY' else 380000)
print(cnt)
Problem p03125 (python)

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

Buggy submission (verdict: Runtime Error):
from fractions import gcd
from functools import reduce
input()
print(reduce(gcd,list(map(int,input().split()))))
Problem p03136 (python)

Fixed submission:
input()
l = list(map(int, input().split()))
l.sort(reverse = True)
print('Yes' if l[0] < sum(l[1:]) else 'No')

Buggy submission (verdict: Runtime Error):
input()
l = list(map(int, input().split())).sort(reverse = True)
print('Yes' if l[0] < sum(l[1:]) else 'No')
Problem p03147 (python)

Fixed submission:
def kuksan(array):
    for i in range(0, n):
        if array[i] > 0:
            left = i
            for j in range(left,n + 1):
                if array[j] <= 0:
                    right = j - 1
                    return left, right, True
    return 0,0,0

n = int(input())
h_list = list(map(int, input().split()))
cnt = 0
while True:
    h_list.append(0)
    kukan = kuksan(h_list)
    if kukan[2]:
        for i in range(kukan[0], kukan[1] + 1):
            h_list[i] -= 1
        cnt += 1
    else:
        break

print(cnt)

Buggy submission (verdict: Runtime Error):
#include<stdio.h>

int main() {
	int n, h[100], i, flg, cnt, stop;
	scanf("%d", &n);
	for (i = 0; i < n; i++) scanf("%d", &h[i]);

	cnt = 0;
	while (1) {
		flg = 0;
		stop = 1;
		for (i = 0; i < n; i++) {
			if (h[i] > 0) {
				if (flg) h[i]--;
				else {
					flg = 1;
					stop = 0;
					cnt++;
					h[i]--;
				}
			}
			else flg = 0;
		}
		if (stop) break;
	}

	printf("%d", cnt);
}
Problem p03220 (python)

Fixed submission:
N = int(input())
T, A = map(int, input().split())
dif = list(map(lambda x: abs(T - int(x) * 0.006 - A), input().split()))
print(dif.index(min(dif)) + 1)

Buggy submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input().split())
dif = list(map(lambda x: abs(T - int(x) * 0.006 - A), input().split()))
print(dif.index(min(x_list)) + 1)
Problem p03244 (python)

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

app = {}
for i, j in zip(v[::2], v[1::2]):
    if i not in app:
        app[i] = [1, 0]
    else:
        app[i][0] += 1
    if j not in app:
        app[j] = [0, 1]
    else:
        app[j][1] += 1

max_o = [0, 0]
secmax_o = [0, 0]
max_e = [0, 0]
secmax_e = [0, 0]
for i in app:
    if app[i][0] > max_o[1]:
        secmax_o = max_o[:]
        max_o = [i, app[i][0]]
    elif app[i][0] > secmax_o[1]:
        secmax_o = [i, app[i][0]]
    if app[i][1] > max_e[1]:
        secmax_e = max_e[:]
        max_e = [i, app[i][1]]
    elif app[i][1] > secmax_e[1]:
        secmax_e = [i, app[i][1]]

if max_o[0] != max_e[0]:
    print(n - max_o[1] - max_e[1])
else:
    del0 = max_o[1] - secmax_o[1]
    del1 = max_e[1] - secmax_e[1]
    print(n + min(del0, del1) - max_o[1] - max_e[1])

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

n = int(input())
v = list(map(int, input().split()))
cnt_o = Counter(v[::2]).most_common(2)
cnt_e = Counter(v[1::2]).most_common(2)

mo = cnt_o[0][0]
me = cnt_e[0][0]
if mo == me:
    print(n - cnt_o[0][1] - cnt_e[0][1])
else:
    del1 = cnt_o[0][1] - cnt_o[1][1]
    del2 = cnt_e[0][1] - cnt_e[1][1]
    print(n - cnt_o[0][1] - cnt_e[0][1] + min(del1, del2))
Problem p03424 (python)

Fixed submission:
input()
a = input()
print("Four" if 'Y' in a else "Three")

Buggy submission (verdict: Runtime Error):
#include<stdio.h>

int main() {
	int n, Yellow_exists, i;
	char str[101];
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%c", &str[i]);
	}

	Yellow_exists = 0;
	for (i = 0; i < n; i++) {
		if (str[i] == 'Y') {
			Yellow_exists = 1;
			break;
		}
	}

	printf(Yellow_exists ? "Four" : "Three");
	return 0;
}
Problem p03434 (python)

Fixed submission:
N = input()
a = sorted(list(map(int, input().split())), reverse=True)
print(sum(a[::2]) - sum(a[1::2]))

Buggy submission (verdict: Runtime Error):
N = input()
a = [int(input()) for _ in range(N)]
print(sum(a[::2]) - sum(a[1::2]))
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
print(sum([x for x in range(1, n + 1) if a <= sum([int(c) for c in str(x)]) <= b]))

Buggy submission (verdict: Runtime Error):
#include<stdio.h>

int digit_sum(int num);

int main() {
	int n, a, b, cnt, i, temp;

	cnt = 0;
	scanf("%d%d%d", &n, &a, &b);
	for (i = 1; i <= n; i++) {
		temp = digit_sum(i);
		if (a <= temp && temp <= b) cnt += i;
	}
	printf("%d", cnt);
	return 0;
}

int digit_sum(int num) {
	if (num > 9) return num % 10 + digit_sum(num / 10);
	else return num;
}
Problem p03071 (python)

Fixed submission:
a,b = map(int,input().split())
if a==b:
  print(a*2)
else:
  print(max([a,b])*2-1)

Buggy submission (verdict: Runtime Error):
n = input()
c1=c2=0
l = len(n)
c1 = n - (len([for i in l[0::2] if n == "0"])) - (len([for i in l[1::2] if n == "1"]))
c2 = n - (len([for i in l[0::2] if n == "1"])) - (len([for i in l[1::2] if n == "0"]))

print(min(c1,c2))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a=b:
  print(a*2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a = b:
  print(a*2)
else:
  print(max([a,b])*2-1)
Problem p03101 (python)

Fixed submission:
H,W = map(int,input().split())
h,w = map(int,input().split())

print((H-h)*(W-w))

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

print((H-h)*(W-w))
Problem p03106 (python)

Fixed submission:
a,b,c = map(int,input().split())
list = []
for i in range(1,min(a,b)+1) :
  if a%i == 0 and b%i == 0:
    list.append(i)
list.reverse()
print(list[c-1])

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
list = []
for i in range( min(a,b)) :
  if i == 0:
    continue
  if a%i == 0 and b%i ==0:
    list.append(i)
list.reverse()

print(list[c-1])
Problem p03076 (python)

Fixed submission:
#マックスから引くやり方
import numpy as np
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
# 届く時間を1の位で切り上げたとき、届く時間の和
Menu = [A,B,C,D,E]
L1=[0]
L2=[]
time_max=0
extra=[]
"""
解答1
"""
for i in Menu:
    if i%10==0:
        L1.append(i)
    else:
        L2.append(i + 10 - int(i%10))
        extra.append(i%10)

if len(L2)>0:        
	tmp = 10 - min(extra)
	time_max=sum(L1)+sum(L2)
	print(time_max-tmp)
else: #全部10で割れる場合
  print(sum(L1))

Buggy submission (verdict: Runtime Error):
#マックスから引くやり方
import numpy as np
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
# 届く時間を1の位で切り上げたとき、届く時間の和
Menu = [A,B,C,D,E]
L1=[0]
L2=[]
time_max=0
extra=[]
"""
解答1
"""
for i in Menu:
    if i%10==0:
        L1.append(i)
    else:
        L2.append(i + 10 - int(i%10))
        extra.append(i%10)
tmp = 10 - min(extra)
time_max=sum(L1)+sum(L2)
print(time_max-tmp)
Problem p03605 (python)

Fixed submission:
n = int(input())

b = [int(x) for x in list(str(n))]

if b[0] == 9 or b[1] == 9:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = input()
b = [int(x) for x in list(str(n))]

for i in b:
    if i in 9:
        print("Yes")
        break
Problem p03845 (python)

Fixed submission:
N = int(input())
a = [int(x) for x in input().split()]
M = int(input())

for i in range(M):
    x,y = map(int,input().split())
    c = a[x-1]
    a[x-1] = y

    print(sum(a))
    a[x-1] = c

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [int(x) for x in input().split()]
M = int(input())

for i in range(M):
    x,y = map(int,input().split())
    a[0] = x
    a[1] = y
    print(sum(a))
Problem p04029 (python)

Fixed submission:
N = int(input())
a = N*(N+1)/2
print(int(a))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = N*(N+1)/2
print(int(b))
Problem p03071 (python)

Fixed submission:
if __name__ == "__main__":
    p, q = input().split()
    p = int(p)
    q = int(q)
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
    print(answer)

Buggy submission (verdict: Runtime Error):
if __name__ == "__main__":
    p, q = input().split()
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
	print(answer)

Buggy submission (verdict: Runtime Error):
if __name__ == "__main__":
    p, q = input().split()
    if p > q:
        answer = p
        p = p - 1
    else:
        answer = q
        q = q - 1
    if p > q:
        answer += p
    else:
        answer += q
Problem p03308 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
print(max(A)-max(B))
Problem p03373 (python)

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

_1=a*x+b*y

if x>=y:
  _2=c*2*y+(x-y)*a
  _3=2*x*c
else:
  _2=c*2*x+(y-x)*b
  _3 = 2*y*c

print(min(_1,_2,_3)  )

Buggy submission (verdict: Runtime Error):
a,b,c,x,y=map(int,input().split())
ans=a*x+b*y
for i in range(x+1):
  for j in range(y+1):
    if a*i+j*b+(x+y-i+j)*c<num:
      ans=a*i+j*b+(x+y-i+j)*c
print(ans)
Problem p03455 (python)

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

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

if int(a)*int(b)//2==0:
  print("Even")
 else:
  print("Odd")
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input(),split())
print((a+b+1)//2)
Problem p03494 (python)

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

count=0

while True:
  for i in range(len(l)):
    if l[i]%2==0:
        l[i] //= 2
    else:
        print(count)
        exit()
    
  count += 1

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

count=0

while True:
  for i in range(len(l)):
    if l[i]%2==0:
        l[i] //= 2
        else:
            print(count)
            exit()
    count += 1
Problem p03611 (python)

Fixed submission:
n = int(input())
cnt= [0]*100002
a = list(map(int, input().split()))
for v in a:
    cnt[v-1] += 1
    cnt[v] += 1
    cnt[v+1] += 1

print(max(cnt))

Buggy submission (verdict: Runtime Error):
n = int(input())
cnt= [0]*100000
a = list(map(int, input().split()))
for v in a:
    cnt[v-1] += 1
    cnt[v] += 1
    cnt[v+1] += 1

print(max(cnt))

Buggy submission (verdict: Runtime Error):
n = int(input())
cnt= [0]*10001
a = list(map(int, input().split()))
for v in a:
    cnt[v-1] += 1
    cnt[v] += 1
    cnt[v+1] += 1

print(max(cnt))
Problem p03644 (python)

Fixed submission:
n=int(input())
ans=1
for i in range(1,(n+1)):
  if (i//ans)%2 == 0:
    ans=i
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
ans=1
for i in range(a,(n+1)):
  if (i//ans)%2 == 0:
    ans=i
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
ans=a
for i in range(a,(n+1)):
  if (i//ans)%2 == 0:
    ans=i
print(ans)
Problem p03814 (python)

Fixed submission:
S=input()

print(S.rfind("Z")-S.find("A")+1)

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

print(S.rfind("Z")-S.find("A"+1))
Problem p04044 (python)

Fixed submission:
n,l=map(int,input().split())
s=[]
for i in range(n):
  s.append(input())
  
  
s.sort()
print("".join(s))

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
s=[]
for i in range(n):
  s.append(input())
  
  
s.sort()
for i in range(l):
  print(s[i],end="")

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
s=[]
for i in range(n):
  tmp=input()
  s.append(tmp)

s.sort()
for i in range(l):
  print(s[i],end="")
Problem p03071 (python)

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

ans = 0
if A == B:
    ans = A + B
elif A > B:
    ans = A + (A - 1)
else:
    ans = B + (B - 1)

print(ans)

Buggy submission (verdict: Runtime Error):
S = list(map(int, input()))

count = 0
tmp = S[0]
for ii in S:
    if ii != tmp:
        count += 1
    tmp = abs(tmp-1)

print(count)
Problem p03071 (python)

Fixed submission:
line = input().strip()
line = line.split(' ')
A = int(line[0])
B = int(line[1])
ans = 0
ans = max(ans, A + A - 1)
ans = max(ans, A + B)
ans = max(ans, B + B - 1)
print(ans)

Buggy submission (verdict: Runtime Error):
#include<algorithm>
#include<iostream>
int main(argc, **argv) {
	int a, b;
  	cin>>a;
  	cin>>b;
  	int ans = 0;
  	ans = max(ans, a + a-1);
  	ans = max(ans, a + b);
  	ans = max(ans, b + b-1);
  	cout << asn << endl;
}

Buggy submission (verdict: Runtime Error):
line = trim(input(STDIN))
line = line.split(' ')
A = line[0]
B = line[1]
ans = 0
ans = max(ans, A + A - 1)
ans = max(ans, A + B)
ans = max(ans, B + B - 1)
print(ans)

Buggy submission (verdict: Runtime Error):
line = trim(input(STDIN))
line = ' '.split(line)
A = line[0]
B = line[1]
ans = 0
ans = max(ans, A + A - 1)
ans = max(ans, A + B)
ans = max(ans, B + B - 1)
print(ans)
Problem p03071 (python)

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

l = [2*a-1, a+b, 2*b-1]

print(max(l))

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

l = [2*a-1, a+b, 2b-1]

print(max(l))
Problem p03085 (python)

Fixed submission:
X = str(input())

words = {
    'A': 'T',
    'T': 'A',
    'C': 'G',
    'G': 'C'
}

print(words[X])

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = str(input())
lists = list(list(map(int, input().split())) for i in range(q))
AC_index = []
counter = 0

for i in range(n-1):
    if s[i] + s[i+1] == 'AC':
        AC_index.append(i)

for i in range(q):
    l, r = (lists[i][0]-1), (lists[i][1]-1)
    for j in AC_index:
        if l <= j <= r-1:
            counter += 1
    print(counter)
    counter = 0
Problem p03086 (python)

Fixed submission:
S = str(input())
counter = 0
max = 0

for i in S:
    if i == 'A' or i == 'T' or i == 'C' or i == 'G':
        counter += 1
        if counter >= max:
            max = counter
    else:
        counter = 0

print(max)

Buggy submission (verdict: Runtime Error):
S = str(input())
counter = 0
series = []

for i in S:
    if i == 'A' or i == 'T' or i == 'C' or i == 'G':
        counter += 1
    else:
        series.append(counter)
        counter = 0

print(max(series))

Buggy submission (verdict: Runtime Error):
S = str(input())
counter = 0
series = []

for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'T' or S[i] == 'C' or S[i] == 'G':
        counter += 1
    else:
        series.append(counter)
        counter = 0

print(max(series))

Buggy submission (verdict: Runtime Error):
S = str(input())
counter = 0
series = []

for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'T' or S[i] == 'C' or S[i] == 'G':
        counter += 1
    else:
        series.append(counter)
        counter = 0

print(max(series))
Problem p03109 (python)

Fixed submission:
y, m ,d = map(int, input().split('/'))

A = None

if y > 2019 :
    A = 'TBD'
elif m > 4 :
    A = 'TBD'
elif d > 30 :
    A = 'TBD'
else:
    A = 'Heisei'
    
print(A)

Buggy submission (verdict: Runtime Error):
N = int(input())
M = [[i for i in input().split()] for i in range(N)]
C = 0

for i in range(N):
    if M[i][1] == 'JPY':
        C += int(M[i][0])
    elif M[i][1] == 'BTC':
        C += float(M[i][0])*380000

print(C)
Problem p03110 (python)

Fixed submission:
N = int(input())
M = [[i for i in input().split()] for i in range(N)]
C = 0

for i in range(N):
    if M[i][1] == 'JPY':
        C += int(M[i][0])
    elif M[i][1] == 'BTC':
        C += float(M[i][0])*380000

print(C)

Buggy submission (verdict: Runtime Error):
N = int(input())
M = [[int(i) for i in input().split()] for i in range(N)]
C = 0

for i in range(N):
    if A[i][1] == 'JPY':
        C += M[i][0]
    elif A[i][1] == 'BTC':
        C += M[i][0]*380000

print(C)

Buggy submission (verdict: Runtime Error):
N = int(input())
M = [[int(i) for i in input().split()] for i in range(N)]
C = 0

for i in range(N):
    if A[i][1] == 'JPY':
        C += M[i][0]
    elif A[i][1] == 'BTC':
        C += M[i][0]*380000

print(C)
Problem p03610 (python)

Fixed submission:
s = str(input())
s = s[::2]
print(s)

Buggy submission (verdict: Runtime Error):
s = str(input())
odd =[]

n = int(len(s)/2)

for i in range(n+1):
    odd.append(s[2*i])

print(''.join(odd))
Problem p03624 (python)

Fixed submission:
s = str(input())

import string

s = set(sorted(list(s)))
t = set(list(string.ascii_lowercase))
remain = t - s
remain = list(remain)

if len(remain) > 0:
    print(min(remain))
else:
    print('None')

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

import string

s = set(sorted(list(s)))
t = set(list(string.ascii_lowercase))
remain = t - s
remain = list(remain)

print(min(remain))
Problem p03455 (python)

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

mod = (a*b)%2
if mod == 1:
    print('Odd')
else:
    print('Even')

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

mod = a*b/2
if c == 1:
  print('Odd')
else c == 0:
  print('Even')

Buggy submission (verdict: Runtime Error):

mod = (a*b)/2

if mod == 1:
    print(Odd)
else mode == 0:
    print(Even)