Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
a = int(input('a = '))

if a == 25:
	print "Christmas"
if  a == 24:
	print "Christmas Eve"
if  a == 23:
	print "Christmas Eve Eve"
if a==22:
	print "Christmas Eve Eve Eve"

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

if a == 25:
	print('Christmas')
if a == 24:
	print('Christmas Eve')
if a == 23:
	print('Christmas Eve Eve')
if a==22:
	print('Christmas Eve Eve Eve')

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

def count(a):
	if a == 25:
		print "Christmas"
	if  a == 24:
		print "Christmas Eve"
	if  a == 23:
		print "Christmas Eve Eve"
	if a==22:
		print "Christmas Eve Eve Eve"

if __name__ == "__main__":
    print('入力してください')
    b = input('a = ')
    count(b)   

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

if a == 25:
	print('Christmas')
if a == 24:
	print('Christmas Eve')
if a == 23:
	print('Christmas Eve Eve')
if a==22:
	print('Christmas Eve Eve Eve')

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

def count(a):
	if a == 25:
		print "Christmas"
	elif  a == 24:
		print "Christmas Eve"
	elif  a == 23:
		print "Christmas Eve Eve"
	elif a==22:
		print "Christmas Eve Eve Eve"

if __name__ == "__main__":
    print('入力してください')
    b = input('a = ')
    count(b)    

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

if a == 25:
	print('Christmas')
if a == 24:
	print('Christmas Eve')
if a == 23:
	print('Christmas Eve Eve')
if a==22:
	print('Christmas Eve Eve Eve')

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

def count(a):
	if 'a == 25':
		print "Christmas"
	elif  'a == 24':
		print "Christmas Eve"
	elif  'a == 23':
		print "Christmas Eve Eve"
	elif  'a == 22':
		print "Christmas Eve Eve Eve"

if __name__ == "__main__":
    print('入力してください')
    a = input('a = ')
    count(a)

    

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

if a == 25:
	print('Christmas')
if a == 24:
	print('Christmas Eve')
if a == 23:
	print('Christmas Eve Eve')
if a==22:
	print('Christmas Eve Eve Eve')

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

def count():
	if 'a == 25':
		print "Christmas"
	elif  'a == 24':
		print "Christmas Eve"
	elif  'a == 23':
		print "Christmas Eve Eve"
	elif  'a == 22':
		print "Christmas Eve Eve Eve"

if __name__ == "__main__":
    print('入力してください')
    a = input('a = ')
    count(a)

    

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

if a == 25:
	print('Christmas')
if a == 24:
	print('Christmas Eve')
if a == 23:
	print('Christmas Eve Eve')
if a==22:
	print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
a = [ int(i) for i in input().split() ]
ans = 0
for i in range(60):
    zero = 0
    one = 0
    if (a[n-1] & (1<<i)) == 0:
        zero += 1
    else:
        one += 1

    for j in range(n-2,-1,-1):
        if (a[j] & (1<<i)) == 0:
            ans += one * (1<<i)
            ans %= mod
            zero += 1
        else:
            ans += zero * (1<<i)
            ans %= mod
            one += 1


print(ans)                 


Fixed submission:
mod = 10**9+7
n = int(input())
a = [ int(i) for i in input().split() ]
ans = 0
for i in range(60):
    zero = 0
    one = 0
    if (a[n-1] & (1<<i)) == 0:
        zero += 1
    else:
        one += 1

    for j in range(n-2,-1,-1):
        if (a[j] & (1<<i)) == 0:
            ans += one * (1<<i)
            ans %= mod
            zero += 1
        else:
            ans += zero * (1<<i)
            ans %= mod
            one += 1


print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,x = map(int,input().split())
h = x/(a*a)

import math

def f1(d,H,h):
    if h >= H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))


Fixed submission:
a,b,x = map(int,input().split())
h = x/(a*a)

import math

def f1(d,H,h):
    if h == H:
        return 90
    if h > H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))

Buggy python submission (verdict: Runtime Error):
a,b,x = map(int,input().split())
h = x/(a*a)

import math

def f1(d,H,h):
    if h > H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))


Fixed submission:
a,b,x = map(int,input().split())
h = x/(a*a)

import math

def f1(d,H,h):
    if h == H:
        return 90
    if h > H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [ int(i) for i in input().split() ]
ans = []
for i in range(1,n):
    if a[i] > a[i-1]:
        ans.append(0)
    else:
        ans.append(1)


dp = [ 0 for i in range(n-1) ]
dp[0] = ans[0]
for i in range(1,n-1):
    if ans[i] == 0:
        dp[i] = 0
    else:
        dp[i] = 1 + dp[i-1]

print(max(dp))


Fixed submission:
n = int(input())
a = [ int(i) for i in input().split() ]
if n == 1:
    print(0)
    import sys
    sys.exit()
ans = []
for i in range(1,n):
    if a[i] > a[i-1]:
        ans.append(0)
    else:
        ans.append(1)


dp = [ 0 for i in range(n-1) ]
dp[0] = ans[0]
for i in range(1,n-1):
    if ans[i] == 0:
        dp[i] = 0
    else:
        dp[i] = 1 + dp[i-1]

print(max(dp))
Buggy python submission (verdict: Runtime Error):
n,x = map(int,input().split())
l = [ int(i) for i in input().split() ]
st = 0
cnt = 1
for i range(0,n):
  st += l[i]
  if st > x:
    break
  cnt += 1
print(cnt)

Fixed submission:
n,x = map(int,input().split())
l = [ int(i) for i in input().split() ]
st = 0
cnt = 1
for i in range(0,n):
  st += l[i]
  if st > x:
    break
  cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
card = [ set() for i in range(n+1) ]
for i in range(m):
    l,r = map(int,input().split())
    for j in range(l,r+1):
        card[j].add(i)

ans = 0
for i in card:
    if len(i) == m:
        ans += 1
print(ans)


Fixed submission:
n,m = map(int,input().split())
card = [ 0 for i in range(n+5) ]
for i in range(m):
    l , r = map(int,input().split())
    card[l] += 1
    card[r+1] -= 1

for i in range(1,n+1):
    card[i] += card[i-1]
ans = 0
for i in card:
    if i == m:
        ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
d = dict()
a = [ int(i) for i in input().split() ]

for i in range(n):
    for j in range(1,int(a[i]**0.5)+1):
        if a[i] % j == 0:
            try:
                d[j].add(i)
            except:
                d[j] = set()
                d[j].add(i)
            try:
                d[a[i]//j].add(i)
            except:
                d[a[i]//j] = set()
                d[a[i]//j].add(i)

ans = 0
for i in d.keys():
    if len(d[i]) >= n-1:
        ans = max(ans, i)
print(ans)


Fixed submission:
n = int(input())
d = set()
a = [ int(i) for i in input().split() ]
a = sorted(a)
for i in range(2):
    for j in range(1,int(a[i]**0.5)+1):
        if a[i] % j == 0:
            d.add(j)
            d.add(a[i]//j)
ans = 0
for i in d:
    cnt = 0
    for j in a:
        if j % i != 0:
            cnt += 1

        if cnt >= 2:
            break

    if cnt < 2:
        ans = max(ans,i)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
d = dict()
a = [ int(i) for i in input().split() ]

for i in range(n):
    for j in range(1,int(a[i]**0.5)+1):
        if a[i] % j == 0:
            try:
                d[j].add(i)
            except:
                d[j] = set()
                d[j].add(i)
            try:
                d[a[i]//j].add(i)
            except:
                d[a[i]//j] = set()
                d[a[i]//j].add(i)

ans = 0
for i in d.keys():
    if len(d[i]) >= n-1:
        ans = max(ans, i)
print(ans)


Fixed submission:
n = int(input())
d = set()
a = [ int(i) for i in input().split() ]
a = sorted(a)
for i in range(2):
    for j in range(1,int(a[i]**0.5)+1):
        if a[i] % j == 0:
            d.add(j)
            d.add(a[i]//j)
ans = 0
for i in d:
    cnt = 0
    for j in a:
        if j % i != 0:
            cnt += 1

        if cnt >= 2:
            break

    if cnt < 2:
        ans = max(ans,i)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = 0
for i in range(n):
  a,b =  input().split()
  a = double(a)
  if b == "BTC":
    a = 380000.0 * a 
  ans += a 
print(a)
    
    

Fixed submission:
n = int(input())
ans = 0
for i in range(n):
  a,b =  input().split()
  a = float(a)
  if b == "BTC":
    a = 380000.0 * a 
  ans += a 
print(ans)
Buggy python submission (verdict: Runtime Error):
from math import log
from math import floor
x = int(input())

y = []
for i in range(2,x):
    j = floor(log(x,i))
    if j>1 and i**j <= x:
        y.append(i**j)
print(max(y))


Fixed submission:
import bisect
a = []
for pw in range(2,1001):
    for x in range(1,1001):
        nw = x**pw
        if nw > 1000:
            break
        a.append(nw)
a = sorted(a)
x = int(input())
y = bisect.bisect_right(a,x)
print(a[y-1])
Buggy python submission (verdict: Runtime Error):
																																																																																																																																																																																																											n = int(input())
cnt = [ int(1e9) for i in range(26) ]
for i in range(n):
    s = input()
    nw = [ 0 for j in range(26) ]
    for j in s:
        nw[ord(j) - ord('a')]+=1
    for j in range(26):
        cnt[j] = min( cnt[j], nw[j] )
ans = ""
for i in range(26):
    if cnt[i] != int(1e9):
        ans += chr(i+97) * int(cnt[i])
print(ans)


Fixed submission:
n = int(input())
cnt = [ int(1e9) for i in range(26) ]
for i in range(n):
    s = input()
    nw = [ 0 for j in range(26) ]
    for j in s:
        nw[ord(j) - ord('a')]+=1
    for j in range(26):
        cnt[j] = min( cnt[j], nw[j] )
ans = ""
for i in range(26):
    if cnt[i] != int(1e9):
        ans += chr(i+97) * int(cnt[i])
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
ans = 0
for i in range(n):
    if m > 2:
        m -= 2
        ans += 1
    else:
        break
ans += (m//4)
print(ans)    


Fixed submission:
n,m = map(int,input().split())
ans = 0
if m >= 2 * n :
    ans += n
    m -= 2 * n
else:
    ans += m//2
    m = 0    
ans += (m//4)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())
ans = 0
for i in range(0,k+1):
    for j in range(0,k+1):
        for l in range(0,k+1):
            if i + j + l == s:
                ans += 1
print(ans)


Fixed submission:
k,s = map(int,input().split())
ans = 0
for i in range(0,k+1):
    for j in range(0,k+1):
      if s - (i+j) >= 0 and s - (i+j) <= k:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(X: int):
    if X >= 30:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(X: int):
    if X >= 30:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(X: int):
    if X >= 30:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(X: int):
    if X >= 30:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(X: int):
    if X >= 30:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(X: int):
    if X >= 30:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(N: int, K: int, A: "List[int]"):
    #while True:
    for _ in range(K):
        inc = [0] * N
        dec = [0] * N
        for i in range(N):
            s = max(0, i - A[i])
            e = min(N - 1, i + A[i])
            inc[s] += 1
            dec[e] += 1
        nexts = []
        cur = 0
        for i in range(N):
            cur += inc[i]
            nexts.append(cur)
            cur -= dec[i]
        A = nexts
    print(*A, sep=' ')
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, K, A)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(N: int, K: int, A: "List[int]"):
    #while True:
    for _ in range(K):
        inc = [0] * N
        dec = [0] * N
        for i in range(N):
            s = max(0, i - A[i])
            e = min(N - 1, i + A[i])
            inc[s] += 1
            dec[e] += 1
        nexts = []
        cur = 0
        found = False
        for i in range(N):
            cur += inc[i]
            if cur < N:
                found = True
            nexts.append(cur)
            cur -= dec[i]
        A = nexts
        if not found:
            break
    print(*A, sep=' ')
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, K, A)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: float):
    s = B[0] * 100
    x = int(B[2:])
    #ret = (B * 100 * A) // 100
    ret = ((s + x) * A) // 100
    print(int(ret))
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = str(next(tokens))  # type: float
    solve(A, B)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: float):
    s = int(B[0]) * 100
    x = int(B[2:])
    #ret = (B * 100 * A) // 100
    ret = ((s + x) * A) // 100
    print(int(ret))
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = str(next(tokens))  # type: float
    solve(A, B)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

MOD = 998244353  # type: int

def calc_fraction_mod(numerator, denominator):
    '''
        returns numerator / denominator (mod MOD)
    '''
    inv = pow(denominator, MOD - 2, MOD)
    return numerator * inv % MOD


def solve(N: int, S: int, A: "List[int]"):
    dp = [0] * (S + 1)
    dp[0] = pow(2, N, MOD)
    for a in A:
        for s in range(S + 1)[::-1]:
            if dp[s] == 0:
                continue
            if s + a <= S:
                dp[s + a] += calc_fraction_mod(dp[s], 2)
                dp[s + a] %= MOD
    print(dp[S] % MOD)
    #ret = 0
    #print(ret)

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, S, A)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

MOD = 998244353  # type: int
INV = pow(2, MOD - 2, MOD)

def calc_fraction_mod(numerator):
    '''
        returns numerator / denominator (mod MOD)
    '''
    #inv = pow(denominator, MOD - 2, MOD)
    return numerator * INV % MOD


def solve(N: int, S: int, A: "List[int]"):
    A.sort()
    dp = [0] * (S + 1)
    dp[0] = pow(2, N, MOD)
    for i, a in enumerate(A):
        for s in range(S + 1)[::-1]:
            if dp[s] == 0:
                continue
            if s + a <= S:
                dp[s + a] += calc_fraction_mod(dp[s])
                dp[s + a] %= MOD
    print(dp[S])

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, S, A)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(N: int, A: "List[int]"):
    cur = 1
    ret = 0
    t = []
    for i in range(N):
        v = A[i]
        if v >= cur:
            print(-1)
            return
        t.append(cur)
        ret += cur
        #print(i, cur, ret)
        cur = (cur - v) * 2
    if A[-1] > cur:
        print(-1)
        return
    ret += A[-1]
    #print(ret)

    mx = A[-1]
    for i in range(1, N)[::-1]:
        tmp = min(mx + A[i], 2 ** i)
        if t[i] > tmp:
            ret -= t[i] - tmp
        #ret += tmp
        mx = min(tmp, 2 ** (i - 1))
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N - 0 + 1)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(H: "List[int]", M: "List[int]", K: int):
    s = H[0] * 60 + M[0]
    t = H[1] * 60 + M[1]
    ret = t - s - K
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = [int()] * (2)  # type: "List[int]"
    M = [int()] * (2)  # type: "List[int]"
    for i in range(2):
        H[i] = int(next(tokens))
        M[i] = int(next(tokens))
    K = int(next(tokens))  # type: int
    solve(H, M, K)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(X: int):
    a = 0
    b = 0
    while True:
        tmp = X + b ** 5
        t = int(tmp ** (1 / 5))
        if t ** 5 == tmp:
            a = t
            print(a, b)
            break
        tmp = X + (-b) ** 5
        t = int(tmp ** (1 / 5))
        if t ** 5 == tmp:
            a = t
            print(a, -b)
            break
        b += 1
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(X: int):
    a = 0
    b = 0
    while True:
        for x in [1, -1]:
            tmp = X + (x * b) ** 5
            if tmp < 0:
                continue
            t = int(tmp ** (1 / 5))
            if t ** 5 == tmp:
                print(t, x * b)
                return
        b += 1
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()