Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
from pprint import pprint
N, C = map(int, input().split())
stc = [list(map(int, input().split())) for _ in range(N)]

X = 10**5+2

c_s = [[0 for _ in range(X)] for _ in range(C)]
c_t = [[0 for _ in range(X)] for _ in range(C)]

# チャンネルごとにマッピング
for s,t,c in stc:
    c_s[c-1][s] += 1
    c_t[c-1][t] -= 1

# for c in range(C):
#     pprint(c_s[c][:14])
#     pprint(c_t[c][:14])
# print()

# チャンネルごとにいもす累計
c_rec = [[0 for _ in range(X)] for _ in range(C)]
for c in range(C):
    c_rec[c][0] = c_s[c][0] + c_t[c][0]
    for i in range(1,X):
        c_rec[c][i] = c_rec[c][i-1] + c_s[c][i] + c_t[c][i]

# for c in range(C):
#     pprint(c_rec[c][:14])
# print()

# チャンネルごとのスタートを0.5分ずらす
for c in range(C):
    for i in range(X-1):
        diff = c_rec[c][i+1] - c_rec[c][i]
        if diff > 0: # 負はずらさない
            c_rec[c][i] += diff

# for c in range(C):
#     pprint(c_rec[c][:14])
# print()

# 合計する
sumlist = [0 for _ in range(X)]
for c in range(C):
    for i in range(X):
        sumlist[i] += c_rec[c][i]

# pprint(sumlist[:14])

print(max(sumlist))



Fixed submission:
# -*- coding: utf-8 -*-
from pprint import pprint
N, C = map(int, input().split())
stc = [list(map(int, input().split())) for _ in range(N)]

X = 10**5+2

c_s = [[0 for _ in range(X)] for _ in range(C)]
c_t = [[0 for _ in range(X)] for _ in range(C)]

# チャンネルごとにマッピング
for s,t,c in stc:
    c_s[c-1][s] += 1
    c_t[c-1][t] -= 1

# for c in range(C):
#     pprint(c_s[c][:14])
#     pprint(c_t[c][:14])
# print()

# チャンネルごとにいもす累計
c_rec = [[0 for _ in range(X)] for _ in range(C)]
for c in range(C):
    c_rec[c][0] = c_s[c][0] + c_t[c][0]
    for i in range(1,X):
        c_rec[c][i] = c_rec[c][i-1] + c_s[c][i] + c_t[c][i]

# for c in range(C):
#     pprint(c_rec[c][:14])
# print()

# チャンネルごとのスタートを0.5分ずらす
for c in range(C):
    for i in range(X-1):
        diff = c_rec[c][i+1] - c_rec[c][i]
        if diff > 0: # 負はずらさない
            c_rec[c][i] += diff

# for c in range(C):
#     pprint(c_rec[c][:14])
# print()

# 合計する
sumlist = [0 for _ in range(X)]
for c in range(C):
    for i in range(X):
        sumlist[i] += c_rec[c][i]

# pprint(sumlist[:14])

print(max(sumlist))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
from pprint import pprint
N = int(input())
tn = list(map(int, input().split()))
vn = list(map(int, input().split()))

tn_sum = sum(tn)
time_tbl = [0 for _ in range(tn_sum*2+1)]  # 0.5刻みで×２

lrv = []
lrv.append([0, 0, 0])
t_sum = 0
for t, v in zip(tn, vn):
    lrv.append([t_sum, t_sum+t, v])
    t_sum += t
lrv.append([tn_sum, tn_sum, 0])


def f(l,r,x,v):
    if x <= l:
        return v + l - x
    elif l < x < r:
        return v
    else:
        return v + x - r

for t05 in range(tn_sum*2+1):
    time_tbl[t05] = min([f(l, r, t05/2, v) for l, r, v in lrv])

area = .0
for i in range(tn_sum*2):
    area += (time_tbl[i] + time_tbl[i+1])/4

print(area)


Fixed submission:
# -*- coding: utf-8 -*-
from pprint import pprint
N = int(input())
tn = list(map(int, input().split()))
vn = list(map(int, input().split()))

tn_sum = sum(tn)
time_tbl = [0 for _ in range(tn_sum*2+1)]  # 0.5刻みで×２

lrv = []
lrv.append([0, 0, 0])
t_sum = 0
for t, v in zip(tn, vn):
    lrv.append([t_sum, t_sum+t, v])
    t_sum += t
lrv.append([tn_sum, tn_sum, 0])


def f(l,r,x,v):
    if x <= l:
        return v + l - x
    elif l < x < r:
        return v
    else:
        return v + x - r

for t05 in range(tn_sum*2+1):
    time_tbl[t05] = min([f(l, r, t05/2, v) for l, r, v in lrv])

area = .0
for i in range(tn_sum*2):
    area += (time_tbl[i] + time_tbl[i+1])/4

print(area)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
from collections import defaultdict
from pprint import pprint as pp
import itertools

N, K = map(int, input().split())
xy = [list(map(int, input().split())) for _ in range(N)]

rui = defaultdict(lambda: defaultdict(int))
sumnum = defaultdict(lambda: defaultdict(int))

for x,y in xy:
    rui[x][y] += 1

xlist = list(sorted(rui.keys()))
ylist = []
for x in xlist:
    ylist.extend(list(rui[x].keys()))
ylist = sorted(list(set(ylist)))

for x in xlist:
    tmp = 0
    for y in ylist:
        tmp += rui[x][y]
        sumnum[x][y] = tmp

for y in ylist:
    tmp = 0
    for x in xlist:
        tmp += sumnum[x][y]
        sumnum[x][y] = tmp

xdict = {v: i for i, v in enumerate(xlist)}
ydict = {v: i for i, v in enumerate(ylist)}

sqmin = -1
for x1, y1 in itertools.product(xlist[:-1], ylist[:-1]):
    for x2, y2 in itertools.product(xlist[1:], ylist[1:]):
        if x1 < x2 and y1 < y2:
            if xdict[x1] - 1 < 0:
                xb = (10**9 + 1)*(-1)
            else:
                xb = xlist[max([0, xdict[x1] - 1])]
            if ydict[y1] - 1 < 0:
                yb = (10**9 + 1)*(-1)
            else:
                yb = ylist[max([0, ydict[y1] - 1])]
            tmp = sumnum[x2][y2] - sumnum[xb][y2] - sumnum[x2][yb] + sumnum[xb][yb]
            if tmp >= K:
                area = abs(x2 - x1)*abs(y2 - y1)
                if sqmin > area or sqmin == -1:
                    sqmin = area

print(sqmin)


Fixed submission:
# -*- coding: utf-8 -*-
from collections import defaultdict
from pprint import pprint as pp
import itertools

N, K = map(int, input().split())
xy = [list(map(int, input().split())) for _ in range(N)]

rui = defaultdict(lambda: defaultdict(int))
sumnum = defaultdict(lambda: defaultdict(int))

for x,y in xy:
    rui[x][y] += 1

xlist = list(sorted(rui.keys()))
ylist = []
for x in xlist:
    ylist.extend(list(rui[x].keys()))
ylist = sorted(list(set(ylist)))

for x in xlist:
    tmp = 0
    for y in ylist:
        tmp += rui[x][y]
        sumnum[x][y] = tmp

for y in ylist:
    tmp = 0
    for x in xlist:
        tmp += sumnum[x][y]
        sumnum[x][y] = tmp

xdict = {v: i for i, v in enumerate(xlist)}
ydict = {v: i for i, v in enumerate(ylist)}

sqmin = -1
exy = list(itertools.product(xlist, ylist))
# print(f"len(exy)={len(exy)}")
for i, (x1, y1) in enumerate(exy[:-1]):
    # print(f"x1={x1},y1={y1}")
    # print(f"len(exy[i+1:])={len(exy[i+1:])}")
    for x2, y2 in exy[i+1:]:
        if x1 < x2 and y1 < y2:
            xd1 = xdict[x1] - 1
            yd1 = ydict[y1] - 1
            if xd1 < 0:
                xb = (10**9 + 1)*(-1)
            else:
                xb = xlist[xd1]
            if yd1 < 0:
                yb = (10**9 + 1)*(-1)
            else:
                yb = ylist[yd1]
            tmp = sumnum[x2][y2] - sumnum[xb][y2] - sumnum[x2][yb] + sumnum[xb][yb]
            if tmp >= K:
                area = abs(x2 - x1)*abs(y2 - y1)
                if sqmin > area or sqmin == -1:
                    sqmin = area

print(sqmin)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import itertools
l = ['a', 'b', 'c', 'd']
l2 = ['a', 'b', 'c', 'd']
c = itertools.combinations(l, 2)
p = itertools.product(l, l2)
p = itertools.permutations(l, 2)
ope = ['+','-']
ope_list = itertools.product(ope, repeat=3)

A,B,C,D,E,F = map(int, input().split())

water_max = F // (E+100) * 100
suger_max = water_max * E // 100
ope1_max = water_max // (100*A)
ope3_max = suger_max // C

ope1 = [x for x in range(ope1_max+1)]
ope3 = [x for x in range(ope3_max+1)]

ans_list = []
for a,c in itertools.product(ope1, ope3):
    b = (water_max - 100*a*A) // (100*B)
    water_ans = 100*a*A + 100*b*B
    # E = (c*C + d*D) * 100 / water_ans
    # E * water_ans = (c*C + d*D) * 100
    d = (E * water_ans // 100 - c*C) // D

    if a+b > 0:
        # print(a,b,c,d)
        suger_ans = c*C + d*D
        sugwat_ans = water_ans + suger_ans
        if suger_ans * 100 // water_ans <= E:
            temp = suger_ans * 100 / sugwat_ans
            ans_list.append([temp,sugwat_ans,suger_ans])

ans_list.sort(key=lambda x:x[0])
print(ans_list[-1][1],ans_list[-1][2])


Fixed submission:
# -*- coding: utf-8 -*-
import itertools

A,B,C,D,E,F = map(int, input().split())

ope1 = [x for x in range(F//(100*A)+1)]
ope2 = [x for x in range(F//(100*B)+1)]
ope3 = [x for x in range(F//C+1)]
ope4 = [x for x in range(F//D+1)]

water = []
for a,b in itertools.product(ope1, ope2):
    temp = 100*a*A + 100*b*B
    water.append(temp)
water = sorted(list(set(water)))

sugar = []
for c,d in itertools.product(ope3, ope4):
    temp = c*C + d*D
    sugar.append(temp)
sugar = sorted(list(set(sugar)))

ans_list = []
for w,s in itertools.product(water, sugar):
    if w == 0:
        continue
    if s/(w//100) > E:
        continue
    if w+s > F:
        continue
    ans_list.append([s*100/(s+w),s+w,s])

if len(ans_list) > 0 :
    ans_list.sort(key=lambda x:x[0])
    print(ans_list[-1][1],ans_list[-1][2])
else:
    print(100*A,0)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
ans_list = []
for _ in range(N):
    A=int(input())
    if A in ans_list:
        ans_list.remove(A)
    else:
        ans_list.append(A)

print(len(ans_list))


Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
An = []
for _ in range(N):
    An.append(int(input()))

ans_dict = {}
for A in An:
    if A in ans_dict:
        ans_dict[A] = abs(ans_dict[A] - 1)
    else:
        ans_dict[A] = 1

sum = 0
for i in ans_dict.values():
    sum += i

print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
An = []
for _ in range(N):
    An.append(int(input()))

ans_list = []
for A in An:
    if A in ans_list:
        ans_list.remove(A)
    else:
        ans_list.append(A)

print(len(ans_list))


Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
An = []
for _ in range(N):
    An.append(int(input()))

ans_dict = {}
for A in An:
    if A in ans_dict:
        ans_dict[A] = abs(ans_dict[A] - 1)
    else:
        ans_dict[A] = 1

sum = 0
for i in ans_dict.values():
    sum += i

print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
a = list(map(int, input().split()))

sunuke_l = []
sunuke = 0
arai_l = []
arai = 0
all_sum = sum(a)
diff_l = []
for i in range(1,N):
    sunuke = sum(a[0:i])
    arai = all_sum - sunuke
    diff_l.append(abs(sunuke - arai))

print(min(diff_l))


Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
a = list(map(int, input().split()))

sunuke_l = []
sunuke = 0
arai_l = []
arai = 0
all_sum = sum(a)
diff_l = []
for i in range(N-1):
    sunuke = sunuke + a[i]
    arai = all_sum - sunuke
    diff_l.append(abs(sunuke - arai))

print(min(diff_l))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import itertools

N = int(input())

def primes(n):
    primfac = []
    d = 2
    while d*d <= n:
        while (n % d) == 0:
            primfac.append(d)  # supposing you want multiple factors repeated
            n //= d
        d += 1
    if n > 1:
       primfac.append(n)
    return primfac

def F(a,b):
    return max([len(str(a)), len(str(b))])
    
l = primes(N)
l.append(1)
ans = []
for i in range(1,len(l)//2+1):
    comb = itertools.combinations(l, i)
    comb = list(set(list(comb)))
    for comblist in comb:
        # print(tmp)
        tmp = 1
        for x in comblist:
            tmp *= x

        ans.append(F(tmp,N//tmp))

# print(ans)
print(min(ans))


Fixed submission:
# -*- coding: utf-8 -*-
import itertools

N = int(input())

def primes(n):
    primfac = []
    d = 2
    while d*d <= n:
        while (n % d) == 0:
            primfac.append(d)  # supposing you want multiple factors repeated
            n //= d
        d += 1
    if n > 1:
       primfac.append(n)
    return primfac

def F(a,b):
    return max([len(str(a)), len(str(b))])
    
if N == 1:
    print(1)
    exit()
    
l = primes(N)
l.append(1)
ans = []
for i in range(1,len(l)//2+1):
    comb = itertools.combinations(l, i)
    comb = list(set(list(comb)))
    for comblist in comb:
        # print(tmp)
        tmp = 1
        for x in comblist:
            tmp *= x

        ans.append(F(tmp,N//tmp))

# print(ans)
print(min(ans))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
X = int(input())

sumX = []
sum = 0
for i in range(1,X+1):
    sum += i
    sumX.append(sum)

# print(sumX)

for i in range(X):
    j = X - i 
    if X > sumX[j-1]:
        print(j+1)
        exit()

print(1)


Fixed submission:
# -*- coding: utf-8 -*-
X = int(input())

# sumX = []
sum = 0
for i in range(1,X+1):
    sum += i
    # print("sum=",sum)
    if sum >= X:
        print(i)
        # print("i=", i)
        break
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
TA = []
for _ in range(N):
    TA.append(list(map(int, input().split())))

t0,a0 = 0,0
hyo = 0
for i in range(N):
    t,a = TA[i]
    if t0 == t and a0 == a:
        pass
    else:
        tmpt,tmpa = t,a
        if t0 > t or a0 > a:
            while t0 > tmpt or a0 > tmpa:
                tmpt += t
                tmpa += a
    t0,a0 = tmpt,tmpa
    # print(tmpt, tmpa)

print(t0+a0)



Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
TA = []
for _ in range(N):
    TA.append(list(map(int, input().split())))

t0,a0 = 0,0
for i in range(N):
    t,a = TA[i]
    if t0 == t and a0 == a:
        pass
    else:
        if t0 > t or a0 > a:
            tmp = max([t0//t + min([1, t0 % t]), a0//a + min([1, a0 % a])])
            t0 = t*tmp
            a0 = a*tmp
        else:
            t0 = t
            a0 = a

print(t0+a0)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

S = [s for s in str(input())]

ans = 0


for i in range(len(S)):
    if i == 0:
        continue

    if S[i] == S[i-1]:
        if S[i] == "0":
            del S[i]
            S.insert(i, "1")
        else:
            del S[i]
            S.insert(i, "0")
        ans += 1

print(ans)


Fixed submission:
# -*- coding: utf-8 -*-

S = str(input())
ans = 0
if len(S)==1:
    print(0)
    exit()
elif S=="00" or S=="11":
    print(1)
    exit()

flg = True
if S[0]=="0":
    for i in range(len(S)):
        if i == 0:
            continue
        if i%2 == 0:
            if S[i]!="0":
                ans+=1
                continue
        else:
            if S[i]!="1":
                ans+=1
                continue
else:
    for i in range(len(S)):
        if i == 0:
            continue
        if i%2 == 0:
            if S[i]!="1":
                ans+=1
                continue
        else:
            if S[i]!="0":
                ans+=1
                continue
print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

i = input()

c = 0
c_list = []

if len(i) == 1:
    if i in ['A', 'C', 'G', 'T']:
        print(1)
        exit()
    else:
        print(0)
        exit()

for moji in i:
    if moji in ['A', 'C', 'G', 'T']:
        c += 1
    else:
        c_list.append(c)
        c = 0

print(max(c_list))

Fixed submission:
# -*- coding: utf-8 -*-

i = input()

c = 0
c_list = []

if len(i) == 1:
    if i in ['A', 'C', 'G', 'T']:
        print(1)
        exit()
    else:
        print(0)
        exit()

for moji in i:
    if moji in ['A', 'C', 'G', 'T']:
        c += 1
        c_list.append(c)
    else:
        c_list.append(c)
        c = 0

print(max(c_list))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

# input
# ATCODER

i = input()

c = 0
c_list = []
for moji in i:
    if moji in ['A', 'C', 'G', 'T']:
        c += 1
    else:
        c_list.append(c)
        c = 0


print(max(c_list))

Fixed submission:
# -*- coding: utf-8 -*-

i = input()

c = 0
c_list = []

if len(i) == 1:
    if i in ['A', 'C', 'G', 'T']:
        print(1)
        exit()
    else:
        print(0)
        exit()

for moji in i:
    if moji in ['A', 'C', 'G', 'T']:
        c += 1
        c_list.append(c)
    else:
        c_list.append(c)
        c = 0

print(max(c_list))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math
import sys

A, B, K = (int(i) for i in input().split())

gcd_num = math.gcd(A, B)

if K==1:
    print(gcd_num)
    sys.exit()

yakusuu_array = []
for i in range(1,gcd_num):
    if gcd_num % i == 0:
        yakusuu_array.append(i)
        yakusuu_array.sort(reverse=True)

print(yakusuu_array[K-2])

Fixed submission:
# -*- coding: utf-8 -*-

import fractions

A, B, K = (int(i) for i in input().split())

gcd_num = fractions.gcd(A, B)

if K==1:
    print(gcd_num)
    exit()

yakusuu_array = []
for i in range(1,gcd_num):
    if gcd_num % i == 0:
        yakusuu_array.append(i)
        yakusuu_array.sort(reverse=True)

print(yakusuu_array[K-2])

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math

A, B, K = (int(i) for i in input().split())

gcd_num = math.gcd(A, B)

if K==1:
    print(gcd_num)
    exit()

yakusuu_array = []
for i in range(1,gcd_num):
    if gcd_num % i == 0:
        yakusuu_array.append(i)
        yakusuu_array.sort(reverse=True)

print(yakusuu_array[K-2])

Fixed submission:
# -*- coding: utf-8 -*-

import fractions

A, B, K = (int(i) for i in input().split())

gcd_num = fractions.gcd(A, B)

if K==1:
    print(gcd_num)
    exit()

yakusuu_array = []
for i in range(1,gcd_num):
    if gcd_num % i == 0:
        yakusuu_array.append(i)
        yakusuu_array.sort(reverse=True)

print(yakusuu_array[K-2])
Buggy python submission (verdict: Runtime Error):
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(k)
m=sum(s)
n=sum(l)
print(int(m+n-l))

Fixed submission:
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(l)
m=sum(s)
n=sum(l)
print(int(m+n-p))

Buggy python submission (verdict: Runtime Error):
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
l=max(k)
m=sum(s)
n=sum(l)
print(int(m+n-l))

Fixed submission:
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(l)
m=sum(s)
n=sum(l)
print(int(m+n-p))
Buggy python submission (verdict: Runtime Error):
X,Y=map(int(input(),split())
x,y=map(int(input(),split())
a=(X-x)*(Y-y)
print(a)

Fixed submission:
X,Y=map(int,input().split())
x,y=map(int,input().split())
a=(X-x)*(Y-y)
print(a)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
x=int(b/a)
if(x=<c):
  print(x)
else:
  print(c)


Fixed submission:
a,b,c=map(int,input().split())
x=int(b/a)
if x<=c:
  print(x)
else:
  print(c)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
rint(l[len(l)-c])

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

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c+1])

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

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c+1])

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

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c+1])

Fixed submission:
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c])
Buggy python submission (verdict: Runtime Error):
s=input()
if(s-'2019/04/30' >0):
   print("TBD")
else:
   print("Heisei")

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
s=input()
if(s-"2019/04/30" >0):
   print("TBD")
else:
   print("Heisei")

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
s=input()
if(s-"2019/4/30" >0):
   print("TBD")
else:
   print("Heisei")

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
s=input()
if(s-2019/4/30 >0):
   print("TBD")
else:
   print("Heisei")

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
s=input()
if(s-2019/4/30 >0:
   print("TBD")
else:
   print("Heisei")

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += float(a)*380000
  else:
    z += int(a)
print(z)

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  a=float(a)
  z += a*380000 if b=="BTC" else a
print(z)

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy python submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  a=float(a)
  z+=a*380000 if b=="BTC" else a
print(z)

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")
Buggy python submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Fixed submission:
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += float(a)*380000
  else:
    z += int(a)
print(z)

Buggy python submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Fixed submission:
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += float(a)*380000
  else:
    z += int(a)
print(z)

Buggy python submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  a=float(a)
  z += a*380000 if b=="BTC" else a
print(z)

Fixed submission:
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += float(a)*380000
  else:
    z += int(a)
print(z)

Buggy python submission (verdict: Runtime Error):
n=input()
z=0
for i in range(n):
  a,b=intput().split()
  z+=a*380000 if b=="BTC" else a
print(z)
  


Fixed submission:
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += float(a)*380000
  else:
    z += int(a)
print(z)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().sulit())
if(b%a==0):
  print(a+b)
else:
  print(b-a)
  

Fixed submission:
a,b=map(int,input().split())
if(b%a==0):
  print(a+b)
else:
  print(b-a)
Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
z=float(a/b)
print(z)

Fixed submission:
a,b=map(int,input().split())
z=float(a/b)
print(z)

Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
z=float(t/x)
print(z)


Fixed submission:
a,b=map(int,input().split())
z=float(a/b)
print(z)