Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
if S==T[:-1]:
  print("Yes")
else:
  print("No")

Fixed submission:
S=input()
T=input()
if S==T[:-1]:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
if s==t[:-1]:
  print("Yes")
  else:
    print("No")

Fixed submission:
S=input()
T=input()
if S==T[:-1]:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
if S==T[:-1]:
  print("yes")
  else:
    print("No")

Fixed submission:
S=input()
T=input()
if S==T[:-1]:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
if S.isalpha()=True and 1<=len(S)<=10 and T.isalpha()=True:
  print("Yes")
  else:
    print("No")

Fixed submission:
S=input()
T=input()
if S==T[:-1]:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
if (T.startsadwith(S)) and len(T) == (len(S) + 1):
    print('Yes')
else:
    print('No')

Fixed submission:
S = input()
T = input()
if (T.startswith(S)) and len(T) == (len(S) + 1):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
s,t = input().split(" ")
if(t[0:len(t)-1] == s):
   print("Yes")
else:
   print("No")



Fixed submission:
s = input()
t = input()
if(t[0:len(t)-1] == s):
   print("Yes")
else:
   print("No")

Buggy python submission (verdict: Runtime Error):
s,t = input().split(" ")
if(t[0:len(t)-1] == s):
   print("true")
else:
   print("false")


Fixed submission:
s = input()
t = input()
if(t[0:len(t)-1] == s):
   print("Yes")
else:
   print("No")
Buggy python submission (verdict: Runtime Error):
lst = list(map(lst = list(map(int,input().split()))
if sum(lst)>=22:
    print("bust")
else:
    print("win")int,input().split()))


Fixed submission:
lst = list(map(int,input().split()))
if sum(lst)>=22:
    print("bust")
else:
    print("win")
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

if s==t[:-1]:
    print("Yes")
else"
    print("No")

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

if s==t[:-1]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N, X, Y = [int(n) for n in input().split(' ')]

cnt = [0]*N

for i in range(1, N):  # 1~N-1
    for j in range(i+1, N+1):  # 2~N
        p = []
        p += [j - i]
        if i <= X:
            if j >= Y:
                p += [X-i + j-Y + 1]
            else:
                p += [X-i + Y-j + 1]
        else:
            if j >= Y:
                p += [i-X + j-Y + 1]
            else:
                p += [i-X + Y-j + 1]
        cnt[min(p)] += 1


for i in range(1, N):
    print(cnt[i])


Fixed submission:
N, X, Y = [int(n) for n in input().split(' ')]

cnt = [0]*N

for i in range(1, N):  # 1~N-1
    for j in range(i+1, N+1):  # 2~N
        if i <= X:
            if j >= Y:
                p = min(X-i + j-Y + 1, j - i)
            else:
                p = min(X-i + Y-j + 1, j - i)
        else:
            if j >= Y:
                p = min(i-X + j-Y + 1, j - i)
            else:
                p = min(i-X + Y-j + 1, j - i)
        cnt[p] += 1


for i in range(1, N):
    print(cnt[i])
Buggy python submission (verdict: Time Limit Exceeded):
from copy import copy

X, Y, A, B, C = [int(n) for n in input().split(' ')]
p = [int(n) for n in input().split(' ')]
q = [int(n) for n in input().split(' ')]
r = [int(n) for n in input().split(' ')]

p.sort()
q.sort()

ans = 0
for flag in range(1<<len(r)):
    P = copy(p[-X:])
    Q = copy(q[-Y:])
    for i in range(len(r)):
        if flag & 1<<i:
            P += [r[i]]
        else:
            Q += [r[i]]
    P.sort()
    Q.sort()
    sums = sum(P[-X:]) + sum(Q[-Y:])
    if sums > ans:
        ans = sums

print(ans)


Fixed submission:
from copy import copy

X, Y, A, B, C = [int(n) for n in input().split(' ')]
p = [int(n) for n in input().split(' ')]
q = [int(n) for n in input().split(' ')]
r = [int(n) for n in input().split(' ')]

p.sort()
q.sort()

apple = p[-X:] + q[-Y:] + r
apple.sort()

print(sum(apple[-X-Y:]))

Buggy python submission (verdict: Time Limit Exceeded):
from copy import copy

X, Y, A, B, C = [int(n) for n in input().split(' ')]
p = [int(n) for n in input().split(' ')]
q = [int(n) for n in input().split(' ')]
r = [int(n) for n in input().split(' ')]

p.sort()
q.sort()

ans = 0
for flag in range(1<<len(r)):
    P = copy(p[-X:])
    Q = copy(q[-Y:])
    for i in range(len(r)):
        if flag & 1<<i:
            P += [r[i]]
        else:
            Q += [r[i]]
    P.sort()
    Q.sort()
    sums = sum(P[-X:]) + sum(Q[-Y:])
    if sums > ans:
        ans = sums

print(ans)


Fixed submission:
from copy import copy

X, Y, A, B, C = [int(n) for n in input().split(' ')]
p = [int(n) for n in input().split(' ')]
q = [int(n) for n in input().split(' ')]
r = [int(n) for n in input().split(' ')]

p.sort()
q.sort()

apple = p[-X:] + q[-Y:] + r
apple.sort()

print(sum(apple[-X-Y:]))

Buggy python submission (verdict: Time Limit Exceeded):
from copy import copy

X, Y, A, B, C = [int(n) for n in input().split(' ')]
p = [int(n) for n in input().split(' ')]
q = [int(n) for n in input().split(' ')]
r = [int(n) for n in input().split(' ')]


ans = 0
for flag in range(1<<len(r)):
    P = copy(p)
    Q = copy(q)
    for i in range(len(r)):
        if flag & 1<<i:
            P += [r[i]]
        else:
            Q += [r[i]]
    P.sort()
    Q.sort()
    sums = sum(P[-X:]) + sum(Q[-Y:])
    if sums > ans:
        ans = sums

print(ans)


Fixed submission:
from copy import copy

X, Y, A, B, C = [int(n) for n in input().split(' ')]
p = [int(n) for n in input().split(' ')]
q = [int(n) for n in input().split(' ')]
r = [int(n) for n in input().split(' ')]

p.sort()
q.sort()

apple = p[-X:] + q[-Y:] + r
apple.sort()

print(sum(apple[-X-Y:]))
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

c = a*b

if c%2==1:
  print("Odd")
else:
  print("Even")

Fixed submission:
x = input()
x = x.split(" ")

a = int(x[0])
b = int(x[1])

c = a*b

if c%2==0:
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Time Limit Exceeded):
K, S = [int(n) for n in input().split(' ')]

ans = 0


for X in range(K+1):
    if X > S:
        break
    for Y in range(K+1):
        if (X+Y) > S:
            break
        for Z in range(K+1):
            if (X+Y+Z) == S:
                ans += 1
            elif (X+Y+Z) > S:
                break
print(ans)


Fixed submission:
K, S = [int(n) for n in input().split(' ')]

ans = 0

for x in range(0,K+1):
    for y in range(0,K+1):
        z = S - x - y
        if z >= 0 and z <= K:
            ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = [int(n) for n in input().split(' ')]

ans = 0
for X in range(K+1):
    for Y in range(K+1):
        for Z in range(K+1):
            if (X+Y+Z)==S:
                ans += 1
print(ans)


Fixed submission:
K, S = [int(n) for n in input().split(' ')]

ans = 0

for x in range(0,K+1):
    for y in range(0,K+1):
        z = S - x - y
        if z >= 0 and z <= K:
            ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s,d = map(int,input().split())

c = 0
for i in range(s,d+1):
  if i % s == 0:
  	c = c + 1


if c != 0:
 	print("OK"
else:
  	print("NG")

Fixed submission:
n = int(input())
s,d = map(int,input().split())

c = 0
for i in range(s,d+1):
  if i % n == 0:
  	c = c + 1
  else:
    c = c
    
if c != 0:
 	print("OK")
else:
  	print("NG")

Buggy python submission (verdict: Runtime Error):
n = int(input())
s,d = map(int,input().split())

c = 0
for i in range(s,d+1:
  if i % s == 0:
  	c = c + 1


if c != 0:
 	print("YES")
else:
  	print("NO")
    

Fixed submission:
n = int(input())
s,d = map(int,input().split())

c = 0
for i in range(s,d+1):
  if i % n == 0:
  	c = c + 1
  else:
    c = c
    
if c != 0:
 	print("OK")
else:
  	print("NG")
Buggy python submission (verdict: Runtime Error):
n = int(input())

l = []
for i in range(n):
  l.append(input())
  

L = []
for i in l:
  if i not in L:
    L.append(i)
 
print(len(L))

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

if a > b:
  print("safe")
else:
  print("unsafe")
Buggy python submission (verdict: Runtime Error):
from sys import stdin
 
input_list = []
for line in stdin:
  input_list.append(line.rstrip('\n'))
 
if input_list[0] == input_list[1][:len(input_list[0])]:
  print('Yes')
else:
  print('No)

Fixed submission:
from sys import stdin
 
input_list = []
for line in stdin:
  input_list.append(line.rstrip('\n'))
 
if input_list[0] == input_list[1][:len(input_list[0])]:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
from sysimport stdin

input_list = []
for line in stdin:
  input_list.append(line.rstrip('\n'))

if input_list[0] == input_list[1][:len(input_list[0])]:
  print('Yes')
else:
  print('No)

Fixed submission:
from sys import stdin
 
input_list = []
for line in stdin:
  input_list.append(line.rstrip('\n'))
 
if input_list[0] == input_list[1][:len(input_list[0])]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
import math
n, k = int(input())
a = list(map(int, input().split()))

print(math.ceil((n-1)/(k-1)))

Fixed submission:
import math

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

print(math.ceil((n-1)/(k-1)))
Buggy python submission (verdict: Runtime Error):
from collections import deque

n = int(input())
a = list(map(int, input().split()))

order = n%2
ans = deque([])
for i in range(n):
    if i%2 == order:
        ans.append(a[i])
    else:
        ans.appendleft(a[i])
print(' '.join(ans))

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

forward = True
sec, first = [], []
for i in range(n):
    if i%2:
        first.append(a[i])
    else:
        sec.append(a[i])
arr = first[::-1] + sec
if len(first) != len(sec):
    arr = arr[::-1]

for el in arr:
    print(el, end=' ')

Buggy python submission (verdict: Runtime Error):
from collections import deque

n = int(input())
a = list(map(int, input().split()))

order = n%2
ans = deque([])
for i in range(n):
    if i & 1 == order:
        ans.append(a[i])
    else:
        ans.appendleft(a[i])
print(' '.join(ans))

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

forward = True
sec, first = [], []
for i in range(n):
    if i%2:
        first.append(a[i])
    else:
        sec.append(a[i])
arr = first[::-1] + sec
if len(first) != len(sec):
    arr = arr[::-1]

for el in arr:
    print(el, end=' ')
Buggy python submission (verdict: Runtime Error):
n = int(input())
start = 1
for i in range(2, n+1):
    start *= i
    start %= MOD
print(start)

Fixed submission:
MOD = 10**9 + 7
n = int(input())
start = 1
for i in range(2, n+1):
    start *= i
    start %= MOD
print(start)
Buggy python submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().split())
t = [0] + t
maxRed = 0
for _ in range(int(input())):
    p, x = map(int, input().split())
	maxRed = max(maxRed, t[p]-x)
print(sum(t)-maxRed)

Fixed submission:
n = int(input())
t = [0] + list(map(int, input().split()))

summ = sum(t)

for _ in range(int(input())):
    p, x = map(int, input().split())
    print(summ + x-t[p])
Buggy python submission (verdict: Runtime Error):
a,c,b,k=man(int,split())
print(min(k,a,2a+b-k))

Fixed submission:
a,b,c,k = map(int,input().split())
print(min(k,a,a*2+b-k))
Buggy python submission (verdict: Runtime Error):
N,M=int(input().split())
l=list(map(int,input().split()))
limit=sum(l)/(M*3)
num=0
for i in l:
  if i >= limit:
    num+=0
if num >=M:
  print("Yes")
else:
  print("No")

Fixed submission:
N,M=map(int,input().split())
l=list(map(int,input().split()))
limit=sum(l)/(M*4)
num=0
for i in l:
  if i >= limit:
    num+=1
if num >=M:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())

while abs(N-K) <= N:
  N=abs(N-K)
print(N)

Fixed submission:
N,K=map(int,input().split())

t=N%K
ans=min(t,K-t)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())

while abs(N-K) <= N:
  N=abs(N-K)
else:
  print(N)

Fixed submission:
N,K=map(int,input().split())

t=N%K
ans=min(t,K-t)
print(ans)
Buggy python submission (verdict: Runtime Error):
S = inputs()
T = inputs()
print("Yes" if T.startswith(S) and len(T) == len(S) + 1 else "No", flush=True)

Fixed submission:
S = input()
T = input()
print("Yes" if T.startswith(S) and len(T) == len(S) + 1 else "No", flush=True)
Buggy python submission (verdict: Runtime Error):
xa = list(map(int, input().split()))

if x < a:
  print(0)
else:
  print(10)


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

if xa[0] < xa[1]:
  print(0)
else:
  print(10)
Buggy python submission (verdict: Runtime Error):
in1 = list(map(int, input().split()))
N = in1[0]
X = in2[1]

L = list(map(int, input().split()))
D = [0] * 10000

for i in range(1, N):
  D[i] = D[i-1] + L[i-1]
  if X < D[i]:
    print(D[i-1])

Fixed submission:
in1 = list(map(int, input().split()))
N = in1[0]
X = in1[1]
 
L = list(map(int, input().split()))
L.append(0)
L.append(0)
D = 0
overflow = False
for i in range(1, N+2):
  if X < D:
    print(i-1)
    overflow = True
    break
  if X == D:
    print(i)
    overflow = True
    break
  D = D + L[i-1]

if not overflow:
  print(N+1)
Buggy python submission (verdict: Runtime Error):
numInput = int(input())

amount = numInput
numOdd = int(numInput / 2) + (numInput % 2)
numEven 0 int(numInput / 2)

while True:

    if amount >= 2:
        if numOdd >= 2:
            numOdd -= 2
            numEven += 1
            amount -= 1
        else:
            numEven -= 1
            amount -= 1
    else:
        break

if amount == 1:
    print('YES')
else:
    print('NO')


Fixed submission:
numInput = int(input())

numSequence = list(map(int, input().split(' ')))

numOdd = 0
for i in range(0, len(numSequence)):
    if numSequence[i] % 2 == 1:
        numOdd += 1
        
if numOdd % 2 == 0:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Time Limit Exceeded):
numInput = int(input())
aryInt = list(map(int, input().split(' ')))

def hoge(aryInt):
    for i in range(0, len(aryInt)):

        for j in range(i+1, len(aryInt)):

            # 偶奇が等しい
            ai = aryInt[i]
            aj = aryInt[j]

            if (ai + aj) % 2 == 0:
                aryInt.remove(ai)
                aryInt.remove(aj)
                aryInt.insert(len(aryInt), ai + aj)
                return

            if len(aryInt) == 2 and (ai + aj) % 2 == 1:
                aryInt.remove(ai)
                aryInt.remove(aj)
                return

while True:
    hoge(aryInt)

    if len(aryInt) == 1:
        print('YES')
        break

    if len(aryInt) == 0:
        print('NO')
        break


Fixed submission:
numInput = int(input())

numSequence = list(map(int, input().split(' ')))

numOdd = 0
for i in range(0, len(numSequence)):
    if numSequence[i] % 2 == 1:
        numOdd += 1
        
if numOdd % 2 == 0:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
input_line = raw_input()

idx_start = 0
while input_line[idx_start] != 'A':
    idx_start += 1

idx_end = len(input_line)
while input_line[idx_end-1] != 'Z':
    idx_end -= 1

print(idx_end - idx_start)


Fixed submission:
input_line = raw_input()

idx_start = 0
while input_line[idx_start] != 'A':
    idx_start += 1

idx_end = len(input_line)
while input_line[idx_end-1] != 'Z':
    idx_end -= 1

print(idx_end - idx_start)
Buggy python submission (verdict: Time Limit Exceeded):
import queue
n,k=map(int,input().split())
l=list(map(int,input().split()))
el=queue.deque(maxlen=k)
ans = 0
m = 0
for i in l[:]:
    if len(el) != k:
        el.append((1+i)/2)
        ans = sum(el)
        m = ans
    else:
        el.append((1+i)/2)
        m = m-m_e+el[-1]
        ans = m if m>ans else ans
    m_e = el[0]
print(ans)

Fixed submission:
import queue
n,k=map(int,input().split())
l=list(map(int,input().split()))
el=queue.deque(maxlen=k)
ans = 0
m = 0
for i in l[:]:
    if len(el) == k:
        el.append((1+i)/2)
        m = m-m_e+el[-1]
    else:
        el.append((1+i)/2)
        m +=el[-1]
    ans = m if m>ans else ans
    m_e = el[0]
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import queue
n,k=map(int,input().split())
l=list(map(int,input().split()))
el=queue.deque(maxlen=k)
ans = 0
for i in l[:]:
    el.append((1+i)/2)
    ans = sum(el) if sum(el)>ans else ans
print(ans)

Fixed submission:
import queue
n,k=map(int,input().split())
l=list(map(int,input().split()))
el=queue.deque(maxlen=k)
ans = 0
m = 0
for i in l[:]:
    if len(el) == k:
        el.append((1+i)/2)
        m = m-m_e+el[-1]
    else:
        el.append((1+i)/2)
        m +=el[-1]
    ans = m if m>ans else ans
    m_e = el[0]
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
l=list(map(int,input().split()))
el=[]
for i in l[:]:
    el.append((1+i)/2)
ans=0
for i in range(n-k+1):
    ans = sum(el[i:i+k]) if sum(el[i:i+k]) > ans else ans
print(ans)

Fixed submission:
import queue
n,k=map(int,input().split())
l=list(map(int,input().split()))
el=queue.deque(maxlen=k)
ans = 0
m = 0
for i in l[:]:
    if len(el) == k:
        el.append((1+i)/2)
        m = m-m_e+el[-1]
    else:
        el.append((1+i)/2)
        m +=el[-1]
    ans = m if m>ans else ans
    m_e = el[0]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
for i in range(max(0,n-k)):
    a+=min(l)
    l.remove(min(l))
print(a)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
a=0
for i in range(max(0,n-k)):
    a+=l[i]
print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
l=list(map(int,input().split()))
if n>k:
    for i in range(k):
        l.remove(max(l))
    print(sum(l))
else:
    print(0)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
a=0
for i in range(max(0,n-k)):
    a+=l[i]
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
ans=0
s = 1
while True:
    ans+=s
    a//=2
    s*=2
    if a==1:
        break
ans+=s    
print(ans)

Fixed submission:
a=int(input())
ans=0
s = 1
while True:
    if a==1:
        break
    ans+=s
    a//=2
    s*=2
ans+=s    
print(ans)
Buggy python submission (verdict: Runtime Error):
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n=int(input())
l=list(map(int,input().split()))
a=lcm_list(l)
ans_l = []
for i in l:
    ans_l.append(a/i)
print(int(sum(ans_l)%(10**9+7)))

Fixed submission:
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n=int(input())
l=list(map(int,input().split()))
a=lcm_list(l)
ans_l = []
for i in l:
    ans_l.append(a//i)
print(int(sum(ans_l)%(10**9+7)))

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n=int(input())
l=list(map(int,input().split()))
a=lcm_list(l)
ans_l = []
for i in l:
    ans_l.append(a/i)
print(int(sum(ans_l)%(10**9+7)))

Fixed submission:
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n=int(input())
l=list(map(int,input().split()))
a=lcm_list(l)
ans_l = []
for i in l:
    ans_l.append(a//i)
print(int(sum(ans_l)%(10**9+7)))
Buggy python submission (verdict: Runtime Error):
import fractions
A,B = map(int,input().split())
print(int(A*B/fractions.gcd(A,B)))

Fixed submission:
print(6-int(input())-int(input()))
Buggy python submission (verdict: Runtime Error):
import math
A,B = map(int,input().split())
print(int(A*B/math.gcd(A,B)))

Fixed submission:
import fractions
A,B = map(int,input().split())
print(int(A*B/fractions.gcd(A,B)))
Buggy python submission (verdict: Runtime Error):
print("win") if sum(map(int,input())) < 22 else print("bust")

Fixed submission:
print("win") if sum(list(map(int, input().split()))) < 22 else print("bust")
Buggy python submission (verdict: Time Limit Exceeded):
syogens = []
n = int(input())
for i in range(n):
    syogens.append([])
    a = int(input())
    for j in range(a):
        m,s=map(int,input().split())
        syogens[i].append([m,s])
ok = 0
for i in range(2**n):
    ng = False
    i2 = format(i,"b").zfill(16)
    i2 = i2[::-1]
    for k,j in enumerate(syogens):
        for l,j2 in enumerate(j):
            if i2[k] == "1":#i2[k]
                if str(j2[1]) != i2[j2[0]-1]:#証言が正しいかチェック
                    ng = True#証言が矛盾していればNG
    if ng:
        ng = False
    else:
        if i2.count("1") > ok: ok = i2.count("1") 
print(ok)

Fixed submission:
syogens = []
n = int(input())
for i in range(n):
    syogens.append([])
    a = int(input())
    for j in range(a):
        m,s=map(int,input().split())
        syogens[i].append([m,s])
ok = 0
for i in range(2**n):
    ng = False
    i2 = format(i,"b").zfill(16)
    i2 = i2[::-1]
    for k,j in enumerate(syogens):
        if i2[k] == "1":
            for l,j2 in enumerate(j):
                if str(j2[1]) != i2[j2[0]-1]:
                    ng = True
    if ng:
        ng = False
    else:
        if i2.count("1") > ok: ok = i2.count("1") 
print(ok)
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
l = list(map(int,input().split()))
ans = 0
for i in range(60):
    c0 = 0
    c1 = 0
    for s in l:
        if bin(s>>i)[-1] == "1":c1 += 1
        else: c0 += 1
    ans += (c1*c0)*(2**i)
print(ans%((10**9)+7))

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
ans = 0
for i in range(60):
    c0 = 0
    c1 = 0
    c1 = sum([1 for a in l if (a>>i) & 1])
    c0 = n - c1
    ans += (c1*c0)*(2**i)
print(ans%((10**9)+7))

Buggy python submission (verdict: Time Limit Exceeded):
n = input()
l = list(map(int,input().split()))
ans = 0
for i in range(60):
    c0 = 0
    c1 = 0
    for s in l:
        s0 = format(s,"b").zfill(60)
        s0 = s0[::-1]
        if s0[i] == "1": c1 += 1
        else: c0 += 1
    ans += (c1*c0)*(2**i)
print(ans%((10**9)+7))

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
ans = 0
for i in range(60):
    c0 = 0
    c1 = 0
    c1 = sum([1 for a in l if (a>>i) & 1])
    c0 = n - c1
    ans += (c1*c0)*(2**i)
print(ans%((10**9)+7))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n=input()
print(sum(a^b for a,b in list(itertools.combinations(map(int,input().split()),2)))%(10**9+7))

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
ans = 0
for i in range(60):
    c0 = 0
    c1 = 0
    c1 = sum([1 for a in l if (a>>i) & 1])
    c0 = n - c1
    ans += (c1*c0)*(2**i)
print(ans%((10**9)+7))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
sl = list(map(int,input().split()))
l = []
for i in range(len(sl)):
    for j in range(i+1,len(sl)):
        l.append(sl[i]^sl[j])
print(sum(l)%((10**9)+7))

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
ans = 0
for i in range(60):
    c0 = 0
    c1 = 0
    c1 = sum([1 for a in l if (a>>i) & 1])
    c0 = n - c1
    ans += (c1*c0)*(2**i)
print(ans%((10**9)+7))
Buggy python submission (verdict: Runtime Error):
x = int(input())
k = x//100
print(1) if 100*k <= x and x<= 105*k else print(0)

Fixed submission:
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())
print(1) if d2 == 1 else print(0)