Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s = input()
n = len(s)

left = 0
right = 5
ok = True
while left <n:
    if left >n-1 or right > n:break
    if s[left:right] == "dream":
        
        if s[right:right+2] == "er" and s[right:right+5] != "erase" and s[right:right+6] != "eraser": 
            left = right+2
            right = min(left+5,n)
        else:
            left = right
            right = min(n,left+5)
    
    elif s[left:right] == "erase":
        
        if s[right] == 'r':
         
            left = right+1
            right = min(n,left+5)
        else:
            left = right
            right = min(n,left+5)
    else:
        ok = False
        break
if ok:print("YES")
else:print("NO")

Fixed submission:
s = input()
n = len(s)

left = 0
right = 5
ok = True
while left <n:
    if left >n-1 or right > n:break
    if s[left:right] == "dream":
        
        if s[right:right+2] == "er" and s[right:right+5] != "erase" and s[right:right+6] != "eraser": 
            left = right+2
            right = min(left+5,n)
        else:
            left = right
            right = min(n,left+5)
    
    elif s[left:right] == "erase":
        
        if right < n and s[right] == 'r':
         
            left = right+1
            right = min(n,left+5)
        else:
            left = right
            right = min(n,left+5)
    else:
        ok = False
        break
if ok:print("YES")
else:print("NO")

Buggy python submission (verdict: Runtime Error):
s = input()
n = len(s)

left = 0
right = 5
ok = True
while left <n:
    if s[left:right] == "dream":
        
        if s[right:right+2] == "er" and s[right:right+5] != "erase" and s[right:right+6] != "eraser": 
            left = right+2
            right = min(left+5,n)
        else:
            left = right
            right = min(n,left+5)
    
    elif s[left:right] == "erase":
        
        if s[right] == 'r':
         
            left = right+1
            right = min(n,left+5)
        else:
            left = right
            right = min(n,left+5)
    else:
        ok = False
        break
if ok:print("YES")
else:print("NO")

Fixed submission:
s = input()
n = len(s)

left = 0
right = 5
ok = True
while left <n:
    if left >n-1 or right > n:break
    if s[left:right] == "dream":
        
        if s[right:right+2] == "er" and s[right:right+5] != "erase" and s[right:right+6] != "eraser": 
            left = right+2
            right = min(left+5,n)
        else:
            left = right
            right = min(n,left+5)
    
    elif s[left:right] == "erase":
        
        if right < n and s[right] == 'r':
         
            left = right+1
            right = min(n,left+5)
        else:
            left = right
            right = min(n,left+5)
    else:
        ok = False
        break
if ok:print("YES")
else:print("NO")
Buggy python submission (verdict: Runtime Error):
H, W, M = (int(i) for i in input().split())

hw = set()
hh = [0] * H
ww = [0] * W

for i in range(M):
    ht , wt = (int(i) for i in input().split())
    hw.add((ht-1) * W + wt - 1)
    hh[ht-1] += 1
    ww[wt-1] += 1

hhh = max(hh)
ih = [i for i, x in enumerate(hh) if x == hhh]

www = max(ww)
iw = [i for i, x in enumerate(ww) if x == www]

minus = 1
for iih in ih:
    for iiw in iw:
        if iih * W + iiw not in hw:
            minus = 0
            break

print(hhh + www - minus)




Fixed submission:
import math
N, X, T = (int(i) for i in input().split())

print(T * math.ceil(N / X))
Buggy python submission (verdict: Time Limit Exceeded):
H, W, M = (int(i) for i in input().split())

hw = set()
hh = [0] * H
ww = [0] * W

for i in range(M):
    ht , wt = (int(i) for i in input().split())
    hw.add((ht-1) * W + wt - 1)
    hh[ht-1] += 1
    ww[wt-1] += 1

hhh = max(hh)
ih = [i for i, x in enumerate(hh) if x == hhh]

www = max(ww)
iw = [i for i, x in enumerate(ww) if x == www]

minus = 1
for iih in ih:
    for iiw in iw:
        if iih * W + iiw not in hw:
            minus = 0


print(hhh + www - minus)




Fixed submission:
H, W, M = (int(i) for i in input().split())

hw = set()
hh = [0] * H
ww = [0] * W

for i in range(M):
    ht , wt = (int(i) for i in input().split())
    hw.add((ht-1) * W + wt - 1)
    hh[ht-1] += 1
    ww[wt-1] += 1

hhh = max(hh)
ih = [i for i, x in enumerate(hh) if x == hhh]

www = max(ww)
iw = [i for i, x in enumerate(ww) if x == www]

minus = 1
for iih in ih:
    for iiw in iw:
        if iih * W + iiw not in hw:
            minus = 0
            break

print(hhh + www - minus)

Buggy python submission (verdict: Runtime Error):
H, W, M = (int(i) for i in input().split())

hw = [0] * (H * W)
hh = [0] * H
ww = [0] * W

for i in range(M):
    ht , wt = (int(i) for i in input().split())
    hw[(ht-1) * W + wt - 1] = 1
    hh[ht-1] += 1
    ww[wt-1] += 1

hhh = max(hh)
ih = [i for i, x in enumerate(hh) if x == hhh]

www = max(ww)
iw = [i for i, x in enumerate(ww) if x == www]

minus = 1
for iih in ih:
    for iiw in iw:
        if hw[iih * W + iiw] == 0:
            minus = 0


print(hhh + www - minus)




Fixed submission:
H, W, M = (int(i) for i in input().split())

hw = set()
hh = [0] * H
ww = [0] * W

for i in range(M):
    ht , wt = (int(i) for i in input().split())
    hw.add((ht-1) * W + wt - 1)
    hh[ht-1] += 1
    ww[wt-1] += 1

hhh = max(hh)
ih = [i for i, x in enumerate(hh) if x == hhh]

www = max(ww)
iw = [i for i, x in enumerate(ww) if x == www]

minus = 1
for iih in ih:
    for iiw in iw:
        if iih * W + iiw not in hw:
            minus = 0
            break

print(hhh + www - minus)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
c = input()

x =[0] * N

for i, cc in enumerate(c):
    if cc == "R":
        x[i] = 1

#一番左が赤だと削れる
#一番右が白だと削れる
cmd = 0
while len(x) > 0:
    while len(x) > 0 and x[0] == 1:
        x.pop(0)
    while len(x) > 0 and x[-1] == 0:
        x.pop(-1)
    while len(x) > 0 and x[0] == 0 and x[-1] == 1:
        x[0] = 1
        x[-1] = 0
        cmd += 1

print(cmd)







Fixed submission:
N = int(input())
c = input()

x =[0] * N

ww = 0
rr = 0
for i, cc in enumerate(c):
    if cc == "R":
        x[i] = 1
        rr += 1
    else:
        ww += 1

cmd = 0
for i in range(rr):
    if x[i] == 0:
        cmd += 1

cmd2 = 0
for j in range(rr+1, len(x)):
    if x[j] == 1:
        cmd2 += 1


print(max(cmd, cmd2))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
c = input()

x =[0] * N

for i, cc in enumerate(c):
    if cc == "R":
        x[i] = 1

#一番左が赤だと削れる
#一番右が白だと削れる
cmd = 0
while len(x) > 0:
    if x[0] == 1:
        x.pop(0)
    if len(x) > 0:
        if x[-1] == 0:
            x.pop(-1)
    if len(x) > 0:
        if x[0] == 0 and x[-1] == 1:
            x[0] = 1
            x[-1] = 0
            cmd += 1

print(cmd)







Fixed submission:
N = int(input())
c = input()

x =[0] * N

ww = 0
rr = 0
for i, cc in enumerate(c):
    if cc == "R":
        x[i] = 1
        rr += 1
    else:
        ww += 1

cmd = 0
for i in range(rr):
    if x[i] == 0:
        cmd += 1

cmd2 = 0
for j in range(rr+1, len(x)):
    if x[j] == 1:
        cmd2 += 1


print(max(cmd, cmd2))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
Q = int(input())
BC = []

for i in range(Q):
    b, c = (int(i) for i in input().split())
    BC.append((b,c))

sums = [0] * 10001

init_sum = sum(A)
for a in A:
    sums[a] += 1

for res in BC:
    sums[res[1]] += sums[res[0]]
    init_sum += (res[1] - res[0]) * sums[res[0]]
    sums[res[0]] = 0
    print(init_sum)
    

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()]
Q = int(input())
BC = []

for i in range(Q):
    b, c = (int(i) for i in input().split())
    BC.append((b,c))

sums = [0] * 100001

init_sum = sum(A)
for a in A:
    sums[a] += 1

for res in BC:
    sums[res[1]] += sums[res[0]]
    init_sum += (res[1] - res[0]) * sums[res[0]]
    sums[res[0]] = 0
    print(init_sum)
Buggy python submission (verdict: Time Limit Exceeded):
H,W = (int(i) for i in input().split())
s = [[-1] * (W + 2) for i in range(H+2)]
t = [[-1] * (W + 2) for i in range(H+2)]
 
for i in range(1, H+1):
    SS = input()
    for j in range(W):
        if SS[j] == "#":
            s[i][j+1] = -1
            t[i][j+1] = -1
        else:
            s[i][j+1] = 0
            t[i][j+1] = 0
 
tmp = []
num = 0
for i in range(1, H+1):
    for j in range(1, W+2):
        if s[i][j] == -1 :
            if num != 0:
                for tp in tmp:
                    s[i][tp] = num
                tmp = []
                num =0
        else:
            tmp.append(j)
            num += 1
 
tmp = []
num = 0
for j in range(1, W+1):
    for i in range(1, H+2):
        if t[i][j] == -1 :
            if num != 0:
                for tp in tmp:
                    t[tp][j] = num
                tmp = []
                num =0
        else:
            tmp.append(i)
            num += 1
 
ref = 0
for i in range(H+2):
    for j in range(W+2):
        ref = max(s[i][j] + t[i][j], ref)
 
print(ref-1)

Fixed submission:
H,W = (int(i) for i in input().split())
s = [[-1] * (W + 2) for i in range(H+2)]
t = [[-1] * (W + 2) for i in range(H+2)]

for i in range(1, H+1):
    SS = input()
    for j in range(W):
        if SS[j] == "#":
            s[i][j+1] = -1
            t[i][j+1] = -1
        else:
            s[i][j+1] = 0
            t[i][j+1] = 0

tmp = []
num = 0
for i in range(1, H+1):
    for j in range(1, W+2):
        if s[i][j] == -1 :
            if num != 0:
                for tp in tmp:
                    s[i][tp] = num
                tmp = []
                num =0
        else:
            tmp.append(j)
            num += 1

tmp = []
num = 0
for j in range(1, W+1):
    for i in range(1, H+2):
        if t[i][j] == -1 :
            if num != 0:
                for tp in tmp:
                    t[tp][j] = num
                tmp = []
                num =0
        else:
            tmp.append(i)
            num += 1

ref = 0
for i in range(H+2):
    for j in range(W+2):
        ref = max(s[i][j] + t[i][j], ref)

print(ref-1)
Buggy python submission (verdict: Runtime Error):
import math
N, K = (int(i) for i in input().split())

pow_base = math.floor(math.log((K-1),2)) + 1
base = N * (2 ** pow_base)

res = 0
for i in range(1, N+1):
    if i >= K :
        res += (2 ** pow_base)
    else:
        power = math.floor(math.log((K-1) // i, 2)) + 1
        res += 2 ** (pow_base - power)
print(res / base)




Fixed submission:
import math
N, K = (int(i) for i in input().split())

if K == 1:
    pow_base = 1
else:
    pow_base = math.floor(math.log((K-1),2)) + 1
base = N * (2 ** pow_base)

res = 0
for i in range(1, N+1):
    if i >= K :
        res += (2 ** pow_base)
    else:
        power = math.floor(math.log((K-1) // i, 2)) + 1
        res += 2 ** (pow_base - power)
print(res / base)

Buggy python submission (verdict: Runtime Error):
import math
N, K = (int(i) for i in input().split())

pow_base = math.floor(math.log2((K-1))) + 1
base = N * (2 ** pow_base)

res = 0
for i in range(1, N+1):
    if i >= K :
        res += (2 ** pow_base)
    else:
        power = math.floor(math.log2((K-1) // i)) + 1
        res += 2 ** (pow_base - power)
print(res / base)




Fixed submission:
import math
N, K = (int(i) for i in input().split())

if K == 1:
    pow_base = 1
else:
    pow_base = math.floor(math.log((K-1),2)) + 1
base = N * (2 ** pow_base)

res = 0
for i in range(1, N+1):
    if i >= K :
        res += (2 ** pow_base)
    else:
        power = math.floor(math.log((K-1) // i, 2)) + 1
        res += 2 ** (pow_base - power)
print(res / base)
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = (int(i) for i in input().split())
S = input()

res = []
for num in range(Q):
    l, r = (int(i) for i in input().split())
    S2 = S[l-1:r]
    flag = False
    cnt = 0
    for chr in S2:
        if chr == "A":
            flag = True
        elif chr == "C" and flag == True:
            cnt += 1
            flag = False
        else:
            flag = False
    res.append(cnt)

for i in res:
    print(i)



Fixed submission:
N, Q = (int(i) for i in input().split())
S = input()

code = [0] * N
cnt = 0
index = 0
flag = False
for chr in S: 
    if chr == "A":
            flag = True
    elif chr == "C" and flag == True:
        cnt += 1
        flag = False
    else:
        flag = False
    code[index] = cnt
    index += 1

for num in range(Q):
    l, r = (int(i) for i in input().split())
    print(code[r-1] - code[l-1])
Buggy python submission (verdict: Runtime Error):
from fractions import Fraction

N = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 

A.sort()

res = A[0]
for aa in A:
    res = Fraction.gcd(res, aa)

print(res)

Fixed submission:
import fractions

N = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 

A.sort()

res = A[0]
for aa in A:
    res = fractions.gcd(res, aa)

print(res)

Buggy python submission (verdict: Runtime Error):
import fraction

N = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 

A.sort()

res = A[0]
for aa in A:
    res = fraction.gcd(res, aa)

print(res)

Fixed submission:
import fractions

N = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 

A.sort()

res = A[0]
for aa in A:
    res = fractions.gcd(res, aa)

print(res)

Buggy python submission (verdict: Runtime Error):
import math
N = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 

A.sort()

res = A[0]
for aa in A:
    res = math.gcd(res, aa)

print(res)

Fixed submission:
import fractions

N = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 

A.sort()

res = A[0]
for aa in A:
    res = fractions.gcd(res, aa)

print(res)
Buggy python submission (verdict: Runtime Error):

N = int(input())
h = [int(i) for i in input().split()] 

# 足場iにたどり着く最小コストをc[i]とすると、
# c[i] = min(c[i-1] + |h[i] - h[i-1]| , c[i-2] + |h[i] - h[i-2]|) 

def cost(i):
    if i > 1:
        return min(cost(i-1) + abs(h[i] - h[i-1]) , cost(i-2) + abs(h[i] - h[i-2]))
    if i == 1:
        return cost(i-1) + abs(h[i] - h[i-1])
    if i == 0:
        return 0

print(cost(N-1))

Fixed submission:

N = int(input())
h = [int(i) for i in input().split()] 

# 足場iにたどり着く最小コストをc[i]とすると、
# c[i] = min(c[i-1] + |h[i] - h[i-1]| , c[i-2] + |h[i] - h[i-2]|) 

cost = [0] * N 
for i in range(N):
    if i==0:
        cost[i] = 0
    if i==1:
        cost[i] = abs(h[i] - h[i-1])
    if i > 1:
        cost[i] = min(cost[i-1] + abs(h[i] - h[i-1]) , cost[i-2] + abs(h[i] - h[i-2]))

print(cost[N-1])
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
t = input()

# dp[i][j] : 文字列Sのi文字目までと文字列Tのj文字目まで(Sの最後index, Tの最後index, 値)

dp = [[(0,"") for i in range(len(t) + 2)] for j in range(len(s) + 2)]

dp[0][0] = (0,"")

for i in range(len(s)):
    for j in range(len(t)):
        if s[i] == t[j]:
            if dp[i][j][0] + 1 > dp[i+1][j+1][0]:
                dp[i+1][j+1] = (dp[i][j][0] + 1, dp[i][j][1] + s[i])
            else:
                dp[i+1][j+1] = (dp[i][j+1][0], dp[i][j+1][1])
        if dp[i+1][j+1][0] < dp[i][j+1][0]:
            dp[i+1][j+1] = dp[i][j+1]
        if dp[i+1][j+1][0] < dp[i+1][j][0]:
            dp[i+1][j+1] = dp[i+1][j]
            
print(dp[len(s)][len(t)][1])



Fixed submission:
s = input()
t = input()

# dp[i][j] : 文字列Sのi文字目までと文字列Tのj文字目まででの値(len, 例)

dp = [[0 for i in range(len(t) + 2)] for j in range(len(s) + 2)]

dp[0][0] = 0

for i in range(len(s)):
    for j in range(len(t)):
        if s[i] == t[j]:
            dp[i+1][j+1] = max(dp[i][j] + 1, dp[i+1][j], dp[i][j+1])
        else:
            dp[i+1][j+1] = max(dp[i+1][j], dp[i][j+1])

st = ""
i = len(s) 
j = len(t)            
while i > 0 and j > 0:
    if s[i-1] == t[j-1]:
        st = t[j-1] + st
        i = i - 1
        j = j - 1
    elif dp[i][j] == dp[i-1][j]:
        i = i - 1
    else:
        j = j - 1

print(st)
Buggy python submission (verdict: Runtime Error):
N , K = (int(i) for i in input().split())

h = [0] * N
for i in range(N):
    h[i] = int(input())

h.sort()

min = 1000000000

for i in range(N - K + 1):
    if min > h[i + K - 1] - h[i]:
        min = h[i + K - 1] - h[i]

print(min)


Fixed submission:
D = int(input())

if D == 22:
    print("Christmas Eve Eve Eve")
if D == 23:
    print("Christmas Eve Eve")
if D == 24:
    print("Christmas Eve")
if D == 25:
    print("Christmas")
Buggy python submission (verdict: Runtime Error):
N,M = (int(i) for i in input().split())

clist = []
for _ in range(M):
    p, y = (int(i) for i in input().split())
    clist.append((p,y))

pp = []
for o in range(N):
    pp.append([])

for p, y in clist:
    pp[p-1].append(y)

spp = []
index = 0
for _ in range(N):
    spp.append(sorted(pp[index]))
    index = index + 1

for p, y in clist:
    num = spp[p-1].index(y) + 1
    print('%06d' % p + '%06d' % num)

Fixed submission:
x, y = (int(i) for i in input().split())

print(int(x+y/2))
Buggy python submission (verdict: Runtime Error):
import fraction
N, M = (int(i) for i in input().split())  
S = input()
T = input()

L = fraction.gcd(N, M)
lcm = (N * M) // L

flag = True
for i in range(L):
    if (S[N//L * i] != T[M//L * i]):
        flag = False

if flag:
    print(lcm)
else:
    print("-1")


Fixed submission:
import fractions

N, M = (int(i) for i in input().split())  
S = input()
T = input()

L = fractions.gcd(N, M)
lcm = (N * M) // fractions.gcd(N, M)

flag = True
for i in range(L):
    if (S[N//L * i] != T[M//L * i]):
        flag = False

if flag:
    print(lcm)
else:
    print("-1")

Buggy python submission (verdict: Runtime Error):
import math
N, M = (int(i) for i in input().split())  
S = input()
T = input()

L = math.gcd(N, M)
lcm = (N * M) // math.gcd(N, M)

flag = True
for i in range(L):
    if (S[N//L * i] != T[M//L * i]):
        flag = False

if flag:
    print(lcm)
else:
    print("-1")


Fixed submission:
import fractions

N, M = (int(i) for i in input().split())  
S = input()
T = input()

L = fractions.gcd(N, M)
lcm = (N * M) // fractions.gcd(N, M)

flag = True
for i in range(L):
    if (S[N//L * i] != T[M//L * i]):
        flag = False

if flag:
    print(lcm)
else:
    print("-1")
Buggy python submission (verdict: Runtime Error):
import collections

N = int(input())
v = list(int(i) for i in input().split())


gu = v[0::2]
ki = v[1::2]


gc = collections.Counter(gu)
kc = collections.Counter(ki)

guc = gc.most_common()
kic = kc.most_common()

gv = gc.values()
kv = kc.values()

if guc[0][0] != kic[0][0]:
    gcount = sum(gv) - max(gv)
    kcount = sum(kv) - max(kv)
    print(gcount+kcount)
else:
    if len(guc) == 1 and len(kic) == 1 :
        print(str(guc[0][1]))
    else:
        if len(guc) == 1 and len(kic) != 1 :
            print(str(sum(gv)+sum(kv)-max(gv)-kic[1][1]))
        elif len(guc) != 1 and len(kic) == 1 :
            print(str(sum(gv)+sum(kv)-max(kv)-guc[1][1]))
        else:
            print(str(sum(gv)+sum(kv)-max((guc[1][1] + kic[0][1]), (guc[0][1] + kic[1][1]))))


Fixed submission:
S = input()


S = S.replace("9","!")
S = S.replace("1","9")
S = S.replace("!","1")

print(S)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()

naga = len(S)
count = 0
for i in range(naga):
    ss = S[i]
    tt = T[i]
    if S.find(ss) != -1 :
        count = count + 1
    S = S.replace(ss,"!")
    S = S.replace(tt,ss)
    S = S.replace("!",tt)

    if count > 28:
        break


if S == T:
    print("Yes")
else:
    print("No")


Fixed submission:

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

if max(A,B,C) == A:
    print(A*10+B+C)
elif max(A,B,C) == B:
    print(B*10+A+C)
elif max(A,B,C) == C:
    print(C*10+B+A)
Buggy python submission (verdict: Time Limit Exceeded):

S = input()
T = input()

naga = len(S)

for i in range(naga):
    ss = S[i]
    tt = T[i]
    S = S.replace(ss,"!")
    S = S.replace(tt,ss)
    S = S.replace("!",tt)

if S == T:
    print("Yes")
else:
    print("No")


Fixed submission:
S = input()
T = input()

naga = len(S)
count = 0
for i in range(naga):
    ss = S[i]
    tt = T[i]
    if S.find(ss) != -1 :
        count = count + 1
    S = S.replace(ss,"!")
    S = S.replace(tt,ss)
    S = S.replace("!",tt)

    if count > 28:
        break


if S == T:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
if len(s) <= n:
  print(s)
else:
  print(s[:k] + "...")

Fixed submission:
n = int(input())
s = input()
if len(s) <= n:
  print(s)
else:
  print(s[:n] + "...")
Buggy python submission (verdict: Runtime Error):
print("Yes" if 7 in list(int(input())) else "No")

Fixed submission:
print("Yes" if "7" in list(input()) else "No")
Buggy python submission (verdict: Runtime Error):
l = list(map(int,input().split()))
if l[0]+l[1] >= l[2]:
  print(l[1]+l[2])
  else:
    print(l[0]+2*l[1]+1)

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

Buggy python submission (verdict: Runtime Error):
    l = list(map(int,input().split()))
    if l[0]+l[1] >= l[2]:
      print(l[1]+l[2])
    else:
      print(l[0]+2*l[1]+1)

Fixed submission:
l = list(map(int,input().split()))
if l[0]+l[1] >= l[2]:
  print(l[1]+l[2])
else:
  print(l[0]+2*l[1]+1)
Buggy python submission (verdict: Runtime Error):
n=int(input())
p = list(map(int, input().split()))
sort(p)
sum=0
for i in range(n):
  if i==n-1:
    sum+=p[i]/2
  else:
    sum+=p[i]
print(sum)


Fixed submission:
n=int(input())
p = []
for _ in range(n):
    p.append(int(input()))
p.sort()
sum=0
for i in range(n):
  if i==n-1:
    sum=p[i]//2+sum
  else:
    sum=p[i]+sum
print(sum)
Buggy python submission (verdict: Runtime Error):
a = input()
print(a**3)


Fixed submission:
a=int(input())
print(a**3)

Buggy python submission (verdict: Runtime Error):
a=input()
print(a**3)

Fixed submission:
a=int(input())
print(a**3)

Buggy python submission (verdict: Runtime Error):
s=input()
ans=1
for i in range(3):
	ans*=s
print(ans)


Fixed submission:
a=int(input())
print(a**3)

Buggy python submission (verdict: Runtime Error):
s=input()
ans=1
for i in range(3)
	ans*=s
print(ans)

Fixed submission:
a=int(input())
print(a**3)
Buggy python submission (verdict: Runtime Error):
i=input().split()
print(i[0]/i[1])

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

Buggy python submission (verdict: Runtime Error):
t=int(input())
x=int(input())
print(t/x)


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

Buggy python submission (verdict: Runtime Error):
t=float(input())
x=float(input())
print(t/x)


Fixed submission:
a,b=map(int,input().split())
print(a/b)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b="Christmas"
for i in range(25-a)
	b+=" Eve"
print(b)


Fixed submission:
a=int(input())
b="Christmas"
for i in range(25-a):
	b+=" Eve"
print(b)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b="Christmas"
for i in range(25-a)
	b+=" Eve"
  print(b)

Fixed submission:
a=int(input())
b="Christmas"
for i in range(25-a):
	b+=" Eve"
print(b)