Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
[N, A, B] = [int(i) for i in input().split()]

Ac = 0
Bc = 0

times = 0
length = 0

while length < N:
    if times % 2 == 0:
        length += A
        Ac += 1
    else:
        length += B
        Bc += 1
    
    times += 1

if times % 2 == 0:
    print(A*Ac)
else:
    print(A*Ac - (length - N))

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

div = N // (A+B)

ans = A*div

diff = N - ((A+B)*div)

if A < diff:
    ans += A
else:
    ans += diff

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

hanten = 0

for i in range(Q):
    q = input().split()
    
    if q[0] == "1":
        hanten += 1
    else:
        if hanten % 2 == 0:
            if q[1] == "1":
                S = q[2] + S
            else:
                S = S + q[2]
        else:
            if q[1] == "1":
                S = S + q[2]
            else:
                S = q[2] + S

if hanten % 2 == 0:
    print(S)
else:
    print(S[::-1])

Fixed submission:
S = input()
Q = int(input())

hanten = 0
saki = ""
ato = ""

for i in range(Q):
    q = input().split()
    
    if q[0] == "1":
        hanten += 1
    else:
        if hanten % 2 == 0:
            if q[1] == "1":
                saki += q[2]
            else:
                ato += q[2]
        else:
            if q[1] == "1":
                ato += q[2]
            else:
                saki += q[2]

if hanten % 2 == 0:
    for i in range(len(saki)):
        print(saki[-i-1], end="")
    print(S, end="")
    print(ato)
else:
    for i in range(len(ato)):
        print(ato[-i-1], end="")
    for i in range(len(S)):
        print(S[-i-1], end="")
    print(saki)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

N = int(input())
tasks = []

for i in range(N):
    (A, B) = (int(i) for i in input().split())
    tasks.append((A, B))


def modify_order(l, i):
    for j in range(len(l) - 1, i, -1):
        if l[j-1][1] > l[j][1]:
            l[j-1], l[j] = l[j], l[j-1]

def sort(l):
    for i in range(0, len(l) - 1):
        modify_order(l, i)        
        
sort(tasks)

time = 0

for i in range(N):
    time += tasks[i][0]
    if time > tasks[i][1]:
        print("No")
        sys.exit()
        
print("Yes")


Fixed submission:
import sys

N = int(input())
tasks = []

for i in range(N):
    (A, B) = (int(i) for i in input().split())
    tasks.append((A, B))


sorted_tasks = sorted(tasks, key=lambda k: k[1])

time = 0

for i in range(N):
    time += sorted_tasks[i][0]
    if time > sorted_tasks[i][1]:
        print("No")
        sys.exit()
        
print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
import copy
from functools import reduce
from fractions import gcd

N = int(input())
nums = [int(i) for i in input().split()]
nums2 = copy.copy(nums)
ans = []

def gcds(numlist):
    return reduce(gcd, numlist)


for i in range(N):
   nums.pop(i)
   ans.append(gcds(nums))
   nums = copy.copy(nums2)

print(max(ans))


Fixed submission:
from fractions import gcd

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

fort = [nums[0], gcd(nums[0], nums[1])]
back = [nums[N-1], gcd(nums[N-1], nums[N-2])]
ans = []

for i in range(N-2):
    fort.append(gcd(fort[i+1], nums[i+2]))
                
for i in range(N-2):
    back.append(gcd(back[i+1], nums[N-(i+3)]))
    
for i in range(1, N-1):
    ans.append(gcd(fort[i-1], back[N-2-i]))

ans.append(fort[N-2])
ans.append(back[N-2])

print(max(ans))

Buggy python submission (verdict: Runtime Error):
import math
import copy
from functools import reduce
from fractions import gcd

N = int(input())
nums = [int(i) for i in input().split()]
nums2 = copy.copy(nums)
ans = []

def gcds(numlist):
    return reduce(math.gcd, numlist)


for i in range(N):
   nums.pop(i)
   ans.append(gcds(nums))
   nums = copy.copy(nums2)

print(max(ans))


Fixed submission:
from fractions import gcd

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

fort = [nums[0], gcd(nums[0], nums[1])]
back = [nums[N-1], gcd(nums[N-1], nums[N-2])]
ans = []

for i in range(N-2):
    fort.append(gcd(fort[i+1], nums[i+2]))
                
for i in range(N-2):
    back.append(gcd(back[i+1], nums[N-(i+3)]))
    
for i in range(1, N-1):
    ans.append(gcd(fort[i-1], back[N-2-i]))

ans.append(fort[N-2])
ans.append(back[N-2])

print(max(ans))

Buggy python submission (verdict: Runtime Error):
import math
import copy
from functools import reduce

N = int(input())
nums = [int(i) for i in input().split()]
nums2 = copy.copy(nums)
ans = []

def gcds(numlist):
    return reduce(math.gcd, numlist)


for i in range(N):
   nums.pop(i)
   ans.append(gcds(nums))
   nums = copy.copy(nums2)

print(max(ans))


Fixed submission:
from fractions import gcd

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

fort = [nums[0], gcd(nums[0], nums[1])]
back = [nums[N-1], gcd(nums[N-1], nums[N-2])]
ans = []

for i in range(N-2):
    fort.append(gcd(fort[i+1], nums[i+2]))
                
for i in range(N-2):
    back.append(gcd(back[i+1], nums[N-(i+3)]))
    
for i in range(1, N-1):
    ans.append(gcd(fort[i-1], back[N-2-i]))

ans.append(fort[N-2])
ans.append(back[N-2])

print(max(ans))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = list(input())

white = 0
bcount = 0
wcount = 0
mins = []

for i in range(N):
    if S[i] == ".":
        white += 1

mins.append(white)
        
for i in range(N):
    for j in range(N):
        if (j <= i and S[j] == '#'):
            bcount += 1
        elif (i < j and S[j] == '.'):
            wcount += 1
    mins.append(bcount + wcount)
    bcount = 0
    wcount = 0

print(min(mins))


Fixed submission:
N = int(input())
S = list(input())

bcount = 0
wcount = 0
mins = []

for i in range(N):
    if S[i] == ".":
        wcount += 1

mins.append(wcount)
        
for i in range(N):
    if S[i] == '#':
        bcount += 1
    else:
        wcount -= 1
    mins.append(bcount + wcount)

print(min(mins))
Buggy python submission (verdict: Time Limit Exceeded):
S = [int(x) for x in list(input())]
times = 0

for i in range(len(S) - 1):
    if (S[0] == 0 and S[1] == 0):
        S[1] = 1
        S = S[1:]
        times += 1
    elif (S[0] == 1 and S[1] == 1):
        S[1] = 0
        S = S[1:]
        times += 1
    else:
        S = S[1:]
        
print(times)


Fixed submission:
S = [int(x) for x in list(input())]

min_0 = 0
min_1 = 0

for i in range(len(S)):
    if i % 2 ==0:
        if not (S[i] == 0):
            min_0 += 1
        elif not (S[i] == 1):
            min_1 += 1
    if i % 2 ==1:
        if not (S[i] == 1):
            min_0 += 1
        elif not (S[i] == 0):
            min_1 += 1
                
times = min([min_0, min_1])
print(times)
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = [int(i) for i in input().split()]
S = input()
term = [[int(i) for i in input().split()] for x in range(Q)]
times = 0

for i in range(len(term)):
    for j in range(term[i][1] - term[i][0] - 1):
        if S[j] == 'A':
            if S[j + 1] == 'C':
                times += 1
    print(times)
    times = 0


Fixed submission:
N, Q = [int(i) for i in input().split()]
S = list(input())
term = [[int(i) for i in input().split()] for x in range(Q)]
ACs = [0 for i in range(N)] 
ans = []

for i in range(N-1):
    if (S[i+1] == 'C' and S[i] == 'A'):
        ACs[i+1] = ACs[i] + 1
    else:
        ACs[i+1] = ACs[i] + 0
    
for i in range(len(term)):
    ans.append((ACs[term[i][1] - 1]) - (ACs[term[i][0] - 1]))

for i in range(Q):
        print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = (int(x) for x in input().split())

res = 1
for x in a :
    res = res * x

if (res > 1e18) :
    print(-1)
else :
    print(res)

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

    if a.count(0) >= 1:
        print(0)
        return

    res = 1
    for x in a:
        res *= x
        if (res > 10 ** 18):
            print(-1)
            return
    print(res)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n = map(x**3 + x**2 + x,int(input()))
print(n)

Fixed submission:
a = int(input())
print(a + a**2 + a**3)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
list = []
for y in range(a+1):
  list += [y*4 + (a-y)*2]
  
if b in list:
  print("Yes")
else:
  print("No")

Fixed submission:
s = input()
list = s.split(" ")
for i in range(5):
  if int(list[i]) == 0:
    print(i+1)
Buggy python submission (verdict: Runtime Error):
import itertools
from typing import List


def main():
    h, w, k = map(int, input().split())
    c = []
    for _ in range(h):
        c.append(input().split())

    print(hv(c, h, w, k))


def hv(c: List[List[str]], h: int, w: int, k: int) -> int:
    ret = 0
    for comb_h in itertools.product((False, True), repeat=h):
        for comb_w in itertools.product((False, True), repeat=w):
            cnt = 0
            for i in range(h):
                for j in range(w):
                    if comb_h[i] and comb_w[j] and c[i][j] == '#':
                        cnt += 1
            if cnt == k:
                ret += 1
    return ret


if __name__ == '__main__':
    main()


Fixed submission:
import itertools
from typing import List


def main():
    h, w, k = map(int, input().split())
    c = []
    for _ in range(h):
        c.append(list(input()))

    print(hv(c, h, w, k))


def hv(c: List[List[str]], h: int, w: int, k: int) -> int:
    ret = 0
    for comb_h in itertools.product((False, True), repeat=h):
        for comb_w in itertools.product((False, True), repeat=w):
            cnt = 0
            for i in range(h):
                for j in range(w):
                    if comb_h[i] and comb_w[j] and c[i][j] == '#':
                        cnt += 1
            if cnt == k:
                ret += 1
    return ret


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import math

from typing import List


def main():
    a, b, c = input().split(' ')

    if si([a, b, c]):
        print('YES')
    else:
        print('NO')


def si(nums: List[str]) -> bool:
    a, b, c = nums
    a *= 10 ** 8
    b *= 10 ** 8
    c *= 10 ** 8

    if int(math.sqrt(a)) + int(math.sqrt(b)) < int(math.sqrt(c)):
        return True
    else:
        return False


if __name__ == '__main__':
    main()


Fixed submission:
from typing import List


def main():
    nums = [int(n) for n in input().split(' ')]

    if si(nums):
        print('Yes')
    else:
        print('No')


def si(nums: List[int]) -> bool:
    result = False
    a, b, c = nums

    if 4 * a * b < (c - a - b) ** 2 and (c - a - b) > 0:
        result = True

    return result


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
from collections import deque
from typing import List


def main():
    h, w = map(int, input().split())
    g = [input() for _ in range(h)]
    print(mm(h, w, g))


def mm(h: int, w: int, g: List[List[str]]) -> int:
    ret = 0
    for i in range(h):
        for j in range(w):
            if (g[i][j] == '#'):
                continue
            cnt = 0
            q = deque([(i, j, cnt)])
            v = set()
            while q:
                ii, jj, cnt = q.popleft()
                v.add((ii, jj))
                ret = max(ret, cnt)
                # ↓
                if ii < h - 1 and g[ii + 1][jj] == '.' and (ii + 1, jj) not in v:
                    q.append((ii + 1, jj, cnt + 1))
                # →
                if jj < w - 1 and g[ii][jj + 1] == '.' and (ii, jj + 1) not in v:
                    q.append((ii, jj + 1, cnt + 1))
                # ↑
                if ii > 0 and g[ii - 1][jj] == '.' and (ii - 1, jj) not in v:
                    q.append((ii - 1, jj, cnt + 1))
                # ←
                if jj > 0 and g[ii][jj - 1] == '.' and (ii, jj - 1) not in v:
                    q.append((ii, jj - 1, cnt + 1))
    return ret


if __name__ == '__main__':
    main()


Fixed submission:
c = input()
print(chr(ord(c) + 1))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n = int(input())
s = list(input())
 
result = 0
for range(len(s)):
  if s > n - 3:
    break
  if (s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C'):
    result = result + 1
    
print(result)


Fixed submission:
n = int(input())
s = list(input())

result = 0
for i in range(len(s)):
    if (i > n - 3):
        break
    if (s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C'):
        result = result + 1

print(result)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n = int(input())
s = list(input())

result = 0
for(int i = 0; i < n - 3; i++):
  if (s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C'):
    result = result + 1
    
print(result)

Fixed submission:
n = int(input())
s = list(input())

result = 0
for i in range(len(s)):
    if (i > n - 3):
        break
    if (s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C'):
        result = result + 1

print(result)
Buggy python submission (verdict: Runtime Error):
import copy
import heapq

from typing import List, Tuple


def main():
    d, g = map(int, input().split())
    v = []
    for _ in range(d):
        p, c = map(int, input().split())
        v.append((p, c))

    print(ag(v, g))


def ag(v: List[Tuple[int, int]], g: int) -> int:
    rs = []
    # ex. [(3, 500), (5, 800)] -> [(1, 3, 500), (2, 5, 800)]
    v = [(i, p, c) for i, (p, c) in enumerate(v, 1)]

    for j in range(len(v) ** 2):
        cb = []
        for k in range(len(v)):
            if ((j >> k) & 1):
                cb.append(v[k])

        sc = 0
        cnt = 0
        # calc bonus score
        for (i, p, c) in cb:
            sc += i * 100 * p + c
            cnt += p

        vv = [x for x in copy.copy(v) if not x in cb]
        while sc < g:
            if not vv:
                break
            i, p, _ = vv.pop()
            for _ in range(p - 1):
                if sc >= g:
                    break
                sc += i * 100
                cnt += 1

        if sc >= g:
            heapq.heappush(rs, cnt)

    return heapq.heappop(rs)


if __name__ == '__main__':
    main()


Fixed submission:
import copy
import heapq

from typing import List, Tuple


def main():
    d, g = map(int, input().split())
    v = []
    for _ in range(d):
        p, c = map(int, input().split())
        v.append((p, c))

    print(ag(v, g))


def ag(v: List[Tuple[int, int]], g: int) -> int:
    rs = []
    # ex. [(3, 500), (5, 800)] -> [(1, 3, 500), (2, 5, 800)]
    v = [(i, p, c) for i, (p, c) in enumerate(v, 1)]

    for j in range(2 ** len(v)):
        cb = []
        for k in range(len(v)):
            if ((j >> k) & 1):
                cb.append(v[k])

        sc = 0
        cnt = 0
        # calc bonus score
        for (i, p, c) in cb:
            sc += i * 100 * p + c
            cnt += p

        vv = [x for x in copy.copy(v) if not x in cb]
        while sc < g:
            if not vv:
                break
            i, p, _ = vv.pop()
            for _ in range(p - 1):
                if sc >= g:
                    break
                sc += i * 100
                cnt += 1

        if sc >= g:
            heapq.heappush(rs, cnt)
    return heapq.heappop(rs)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
s_list = list(input())
 
result = None
 
for s_uni in range(ord('a'), ord('z') + 1):
    if not chr(s_uni) in s_list:
        result = chr(s_uni)
        break
 
if result:
  print(result)
else
  print('None')

Fixed submission:
s_list = list(input())

result = None

for s_uni in range(ord('a'), ord('z') + 1):
    if not chr(s_uni) in s_list:
        result = chr(s_uni)
        break

if result:
    print(result)
else:
    print('None')

Buggy python submission (verdict: Runtime Error):
s_list = list(input())

small = None

for s_uni in range(ord('a'), ord('z') + 1):
    if not chr(s_uni) in s_list:
        small = chr(s_uni)
        break

if small:
  print(smal)
else
  print('None')

Fixed submission:
s_list = list(input())

result = None

for s_uni in range(ord('a'), ord('z') + 1):
    if not chr(s_uni) in s_list:
        result = chr(s_uni)
        break

if result:
    print(result)
else:
    print('None')
Buggy python submission (verdict: Runtime Error):
from collections import deque
from typing import List


def main():
    n = int(input())
    v = input().split("")
    print(pp(n, v))


def pp(n: int, v: List[str]) -> List[str]:
    x = []
    y = deque([])

    if n % 2 == 0:
        for i in range(n):
            if i % 2 == 0:
                y.append(v[i])
            else:
                x.append(v[i])
    else:
        for i in range(n):
            if i % 2 == 0:
                x.append(v[i])
            else:
                y.append(v[i])

    ret = []
    for i in range(len(x)):
        ret.append(x.pop())

    for i in range(len(y)):
        ret.append(y.popleft())

    return ret


if __name__ == "__main__":
    main()


Fixed submission:
from collections import deque
from typing import List


def main():
    n = int(input())
    v = input().split(" ")
    print(*pp(n, v))


def pp(n: int, v: List[str]) -> List[str]:
    x = []
    y = deque([])

    if n % 2 == 0:
        for i in range(n):
            if i % 2 == 0:
                y.append(v[i])
            else:
                x.append(v[i])
    else:
        for i in range(n):
            if i % 2 == 0:
                x.append(v[i])
            else:
                y.append(v[i])

    ret = []
    for i in range(len(x)):
        ret.append(x.pop())

    for i in range(len(y)):
        ret.append(y.popleft())

    return ret


if __name__ == "__main__":
    main()

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


def main():
    n = int(input())
    v = [input().split("")]
    print(pp(n, v))


def pp(n: int, v: List[str]) -> List[str]:
    x = []
    y = deque([])

    if n % 2 == 0:
        for i in range(n):
            if i % 2 == 0:
                y.append(v[i])
            else:
                x.append(v[i])
    else:
        for i in range(n):
            if i % 2 == 0:
                x.append(v[i])
            else:
                y.append(v[i])

    ret = []
    for i in range(len(x)):
        ret.append(x.pop())

    for i in range(len(y)):
        ret.append(y.popleft())

    return ret


if __name__ == "__main__":
    main()


Fixed submission:
from collections import deque
from typing import List


def main():
    n = int(input())
    v = input().split(" ")
    print(*pp(n, v))


def pp(n: int, v: List[str]) -> List[str]:
    x = []
    y = deque([])

    if n % 2 == 0:
        for i in range(n):
            if i % 2 == 0:
                y.append(v[i])
            else:
                x.append(v[i])
    else:
        for i in range(n):
            if i % 2 == 0:
                x.append(v[i])
            else:
                y.append(v[i])

    ret = []
    for i in range(len(x)):
        ret.append(x.pop())

    for i in range(len(y)):
        ret.append(y.popleft())

    return ret


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
# coding : utf-8
 
import numpy as np
 
N = int(input())
 
A = [int(i) for i in input().split()]
 
 
count = 0
 
#dist = [0 for i in range(N)]
dist = np.zeros(N)
 
for i in range(N):
	dist[:i+1] += A[i]
	#print(dist)
	count += sum(dist[:i+1]==0)
 
#print(dist)
 
print(count)

Fixed submission:
# coding : utf-8
 
import numpy as np
 
N = int(input())
 
A = [int(i) for i in input().split()]

S = [0 for i in range(N+1)]

for i in range(N):
	S[i+1] = S[i] + A[i]

S = sorted(S)
cnt = 0
block = 1
s = S[0]
for i in range(1,N+1):
	if s == S[i]:
		cnt += block
		block += 1
	else:
		s = S[i]
		block = 1

#print(S)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
# coding : utf-8

import numpy as np

N = int(input())

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


count = 0

#dist = [0 for i in range(N)]
dist = np.zeros(N)
suml = sum(A)

for i in range(N):
	dist[:i+1] += A[i]
	#print(dist)
	count += sum(dist[:i+1]==0)

#print(dist)

print(count)

Fixed submission:
# coding : utf-8
 
import numpy as np
 
N = int(input())
 
A = [int(i) for i in input().split()]

S = [0 for i in range(N+1)]

for i in range(N):
	S[i+1] = S[i] + A[i]

S = sorted(S)
cnt = 0
block = 1
s = S[0]
for i in range(1,N+1):
	if s == S[i]:
		cnt += block
		block += 1
	else:
		s = S[i]
		block = 1

#print(S)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
# coding : utf-8

import numpy as np

N = int(input())

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


count = 0

#dist = [0 for i in range(N)]
dist = np.zeros(N)
suml = sum(A)

for i in range(N):
	dist += A[i]
	#print(dist)
	count += sum(dist[:i+1]==0)

#print(dist)

print(count)

Fixed submission:
# coding : utf-8
 
import numpy as np
 
N = int(input())
 
A = [int(i) for i in input().split()]

S = [0 for i in range(N+1)]

for i in range(N):
	S[i+1] = S[i] + A[i]

S = sorted(S)
cnt = 0
block = 1
s = S[0]
for i in range(1,N+1):
	if s == S[i]:
		cnt += block
		block += 1
	else:
		s = S[i]
		block = 1

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

import numpy as np

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

if A[0] <= A[2] and A[0] + A[1] => A[2]:
	print("YES")
else:
	print("NO")

Fixed submission:
# coding : utf-8

import numpy as np

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

if A[0] <= A[2] and A[0] + A[1] >= A[2]:
	print("YES")
else:
	print("NO")
Buggy python submission (verdict: Runtime Error):
# coding : utf-8

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = np.sort(X)
maxl = np.max(X)
Xed = (X - maxl/2)**2
com = Xed[np.where(np.min(Xed))]
print(X)
print(Xed)
print(com)
print(maxl,Xed[com[0]])


Fixed submission:
# coding : utf-8

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = np.sort(X)
maxl = np.max(X)
Xed = (X - maxl/2)**2
com = X[np.where(Xed == np.min(Xed))]

print(maxl,com[0])

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

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = np.sort(X)
maxl = np.max(X)
Xed = (X - maxl/2)**2
com = X[np.where(np.min(Xed))]
print(X)
print(Xed)
print(com)
print(maxl,X[com[0]])


Fixed submission:
# coding : utf-8

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = np.sort(X)
maxl = np.max(X)
Xed = (X - maxl/2)**2
com = X[np.where(Xed == np.min(Xed))]

print(maxl,com[0])

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

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = np.sort(X)
maxl = np.max(X)
Xed = (X - int(maxl/2))**2
com = X[np.where(np.min(Xed))]
print(maxl,X[com[0]])


Fixed submission:
# coding : utf-8

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = np.sort(X)
maxl = np.max(X)
Xed = (X - maxl/2)**2
com = X[np.where(Xed == np.min(Xed))]

print(maxl,com[0])

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

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = sorted(X)
maxl = np.max(X)
com = X[np.where(np.min(X-int(maxl/2)))]
 
print(maxl,com[0])


Fixed submission:
# coding : utf-8

import numpy as np

N = int(input())
X = np.array([int(i) for i in input().split()])

X = np.sort(X)
maxl = np.max(X)
Xed = (X - maxl/2)**2
com = X[np.where(Xed == np.min(Xed))]

print(maxl,com[0])
Buggy python submission (verdict: Runtime Error):
# coding : utf-8

import numpy as np

A = input()

if(A[0]!=A[1] and A[0]!=A[2] and A[1]!=A[2])
	print("Yes")
else:
	print("No")

Fixed submission:
# coding : utf-8

import numpy as np

A = input()

if(A[0]!=A[1] and A[0]!=A[2] and A[1]!=A[2]):
	print("Yes")
else:
	print("No")