Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
i = input().split()
h = int(i[0])
w = int(i[1])

if h == 1 || w == 1:
    print(1)

if (h * w % 2 == 0):
    print(h * w // 2)
else:
    print(h * w // 2 + 1)

Fixed submission:
i = input().split()
h = int(i[0])
w = int(i[1])

if h == 1 or w == 1:
    print(1)
else:
    if (h * w % 2 == 0):
        print(h * w // 2)
    else:
        print(h * w // 2 + 1)
Buggy python submission (verdict: Runtime Error):
from math import sqrt

i = input().split()
a = int(i[0] * (10 ** 10))
b = int(i[1]* (10 ** 10))
c = int(i[2]* (10 ** 10))

if sqrt(a) + sqrt(b) < sqrt(c):
    print("Yes")
else:
    print("No")

Fixed submission:
from math import sqrt

i = input().split()
a = int(i[0])
b = int(i[1])
c = int(i[2])

d = (c - b - a) > 0
e = (c - b - a) ** 2 > 4 * a * b

if d and e:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import numpy as np
N, D = list(map(int, input().split()))
XY = [list(map(int, input().split())) for _ in range(N)]

res = 0
for i in XY:
    if np.sqrt(XY[i][0] ** 2 + XY[i][1] ** 2) <= D:
        res += 1

print(res)


Fixed submission:
import math
N, D = list(map(int, input().split()))
XY = [list(map(int, input().split())) for _ in range(N)]

res = 0
for i in XY:
    if math.sqrt(i[0] ** 2 + i[1] ** 2) <= D:
        res += 1

print(res)
Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce

N = int(input())
A = list(map(int, input().split()))

res = reduce(lambda a, b: a*b, A)
if res > 10 ** 18:
    print(-1)
else:
    print(res)


Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))

    if 0 in A:
        print(0)
        return

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


if __name__ == "__main__":
    main()

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

N = int(input())
A = list(map(int, input().split()))

res = reduce(lambda a, b: a*b, A)
if res > 10 ** 18:
    print(-1)
else:
    print(res)


Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))

    if 0 in A:
        print(0)
        return

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


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

result = 0
for i in range(0, 1000):
    number = ''.join(['00', str(i)])[-3:]
    number_i = 0
    for s in S:
        if number[number_i] == s:
            number_i += 1
            if number_i == 3:
                result += 1
                break

print(result)


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

result = 0
for i in range(0, 1000):
    number = ''.join(['00', str(i)])[-3:]
    number_i = 0
    for s in S:
        if number[number_i] == s:
            number_i += 1
            if number_i == 3:
                result += 1
                break

print(result)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

print("Even" if a*b % 2 == 0 else "Odd")


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

print("Even" if a*b % 2 == 0 else "Odd")
Buggy python submission (verdict: Runtime Error):
x=int(input())
for i in range(-1000:1000:1):
  for j in range(-1000:1000:1):
    if i**5-j**5==x:
      print(i,j)
      exit()

Fixed submission:
s=input()
if s=="ABC":
  print("ARC")
elif s=="ARC":
  print("ABC")

Buggy python submission (verdict: Runtime Error):
s=input()
if s="ARC":
  print("ABC")
elif s="ABC":
  print("ARC")


Fixed submission:
s=input()
if s=="ABC":
  print("ARC")
elif s=="ARC":
  print("ABC")
Buggy python submission (verdict: Runtime Error):
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
    
ans=total-len(set(sunuke))
 
print(ans)

Fixed submission:
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(a)
    
    
ans=total-len(set(sunuke))
 
print(ans)

Buggy python submission (verdict: Runtime Error):
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
    
ans=total-len(set(sunuke))

print(sunuke)
    
    
    
    

Fixed submission:
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(a)
    
    
ans=total-len(set(sunuke))
 
print(ans)

Buggy python submission (verdict: Runtime Error):
total,okasi=map(int,input().split())
sunuke=[]

for i in range(okasi):
  di=int(input)
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
print(total-len(set(sunuke)))    

Fixed submission:
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(a)
    
    
ans=total-len(set(sunuke))
 
print(ans)
Buggy python submission (verdict: Runtime Error):
x=int(input())
for i in range(-1000:1000:1):
  for j in range(-1000:1000:1):
    if i**5-j**5==x:
      print(i,j)
      exit()

Fixed submission:
x=int(input())
for i in range(-1000,1000,1):
  for j in range(-1000,1000,1):
    if i**5-j**5==x:
      print(i,j)
      exit()

Buggy python submission (verdict: Runtime Error):
N=input()
flag=False
while flag:
   for i in range(-119:119:1):
    for j in range(-119:119:1):
       if i**5-j**5==x:
        flag=True
        print("{}{}",format(i,j))
        break
        
    if flag:
      break
      

Fixed submission:
x=int(input())
for i in range(-1000,1000,1):
  for j in range(-1000,1000,1):
    if i**5-j**5==x:
      print(i,j)
      exit()
Buggy python submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
flag=0    
for i in range(A,B,1):
    if i % K ==0:
       a=1 
        
if a==0:
   print("NG")
    
    
else:
  print("OK")

Fixed submission:
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")

Buggy python submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B,1):
    if i % K ==0:
       print("OK")
       a+=1
       break 
        
elif a==0:
   print("NG")
   
        

Fixed submission:
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")

Buggy python submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B,1):
    if i % K ==0:
       print("OK")
        a+=1
       break 
        
if a==0:
   print("NG")
   
        

Fixed submission:
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")

Buggy python submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B,1):
    if i % K ==0:
       print("OK")
        a+=1
       break 
        
elif a==0:
   print("NG")
   
        

Fixed submission:
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")

Buggy python submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
flag=False
a=0
while flag:
    
    for i in range(A,B,1):
        if i % K ==0:
            print("OK")
            a+=1
            flag=True
            break
        else:    

    if flag:
        break
        
if a==0:
  print("NG")
        

Fixed submission:
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")
Buggy python submission (verdict: Runtime Error):
s,w=int(input()),int(input())
if w>=s:
  print("unsafe")
else:
  print("safe")

Fixed submission:
s,w=map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")

Buggy python submission (verdict: Runtime Error):
s=input()
w=input()
ss=int(s)
ww=int(w)
if ww>=ss:
  print("unsafe")
else:
  print("safe")

Fixed submission:
s,w=map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")

Buggy python submission (verdict: Runtime Error):
if W>=S:
  print("unsafe")
else:
  print("safe")

Fixed submission:
s,w=map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")
Buggy python submission (verdict: Runtime Error):
a,b,c,d=,map(int,input(),split())
hpa=a
hpc=c
while (hpa!=0) and (hpc!=0):
  hpa=hpa-c
  hpc=hpc-a

if hpa=0:
  print("No")

if hpc=0:
  print("Yes")
  
  

Fixed submission:
a,b,c,d=map(int,input().split())
while True:
  c-=b
  if c<=0:
    print("Yes")
    break
  
  a-=d
  if a<=0:
    print("No")
    break
Buggy python submission (verdict: Runtime Error):
N=int(input())
glist=[]
for i in range(N):
  glist.append(input())

print(lens(glist))  
  
  

Fixed submission:
n=int(input())
s=[]
for i in range(n):
  s.append(input())
  
print(len(set(s)))

Buggy python submission (verdict: Runtime Error):
N=int(input())
list=[]
for i in N:
  list.append(input())
  
print(len(list))  

Fixed submission:
n=int(input())
s=[]
for i in range(n):
  s.append(input())
  
print(len(set(s)))

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[]
for i in range(N):
  s.append(input())
  
print(len(set(s)))  

Fixed submission:
n=int(input())
s=[]
for i in range(n):
  s.append(input())
  
print(len(set(s)))
Buggy python submission (verdict: Runtime Error):
s=input()
ans=s.count(1)
print(ans)

Fixed submission:
s=input()
ans=s.count("1")
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
input=stdin.readline
a=1
n=int(input())
ar=list(map(int,input().strip().split()))
for i in ar:
    a*=i
if(a>1000000000000000000):
    print("-1")
else:
    print(a)

Fixed submission:
from sys import stdin
input=stdin.readline
a=1
ok=0
n=int(input())
ar=list(map(int,input().strip().split()))
ar.sort()
for i in ar:
    a*=i
    if(i==0):
        ok=1
        print(0)
        break
    if(a>1000000000000000000):
        ok=1
        print(-1)
        break
    # print(i)
if(ok==0):
    print(a)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = [int(x) for x in input().split()]
P = [int(x) for x in input().split()]

def calc(n):
  return sum(range(1, n + 1)) / n

max_value = -1
max_index = -1

for i in range(N - K + 1):
  s = sum(P[i:i+K])
  max_value = max(max_value, s)
  if max_value == s:
    max_index = i

print(sum([calc(P[i]) for i in range(max_index, max_index + K)]))

Fixed submission:
N, K = [int(x) for x in input().split()]
P = [int(x) for x in input().split()]

def calc(n):
  return sum(range(1, n + 1)) / n

sums = [0]
s = 0
for i in range(N):
  s += calc(P[i])
  sums.append(s)

max_value = -1
max_index = -1

# print(sums)
for i in range(N - K + 1):
  s = sums[i+K] - sums[i]
  # print(i)
  # print(i+K)
  max_value = max(max_value, s)
  if max_value == s:
    max_index = i

print(max_value)
# print(sum([calc(P[i]) for i in range(max_index, max_index + K)]))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = list(map(int, input().split()))

L.sort()

def bsearch(array, value):
  left = 0
  right = len(array)
  while left + 1 < right:
    idx = int(left + (right - left) / 2)
    if array[idx] < value:
      left = idx
    else:
      right = idx
  return left

sum = 0
ai = 0
while ai < len(L) - 2:
  bi = ai + 1
  while bi < len(L) - 1:
    a = L[ai]
    b = L[bi]
    i = bsearch(L, a + b)
    sum += (i - bi)

    bi += 1
  ai += 1

print(sum)

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

L.sort()

def bsearch(array, value):
  left = 0
  right = len(array)
  while left + 1 < right:
    idx = int(left + (right - left) / 2)
    if array[idx] < value:
      left = idx
    else:
      right = idx
  return left

sum = 0
ai = 0
while ai < len(L) - 2:
  bi = ai + 1
  while bi < len(L) - 1:
    a = L[ai]
    b = L[bi]
    i = bsearch(L, a + b)
    sum += (i - bi)

    bi += 1
  ai += 1

print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = [int(_) for _ in input().split()]

A = []
for _ in range(Q):
  A.append(int(input()) - 1)

score = [K] * N

for a in range(len(A)):
  for i in range(len(score)):
    if i == A[a]:
      continue
    score[i] -= 1

for i in range(len(score)):
  if score[i] <= 0:
    print("No")
  else:
    print("Yes")

Fixed submission:
N, K, Q = [int(_) for _ in input().split()]

A = []
for _ in range(Q):
  A.append(int(input()) - 1)

score = [K - Q] * N

for i in range(len(A)):
  score[A[i]] += 1

for i in range(len(score)):
  if score[i] <= 0:
    print("No")
  else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
2import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a = I()
    print(a+a**2+a**3)

Fixed submission:
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a = I()
    print(a+a**2+a**3)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

n = I()
a = Intl()
s = 1
for i in range(n):
    s *= a[i]
print(s if s <= 10**18 else -1)

Fixed submission:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

n = I()
a = Intl()
s = 1
a.sort()
for i in range(n):
    s *= a[i]
    if s > 10**18:
        print(-1)
        exit()
print(s)
Buggy python submission (verdict: Runtime Error):
4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 29211
3 4 3 78537
3 4 2 8580
1 2 1 96263
1 4 2 2156
1 2 0 94325
1 4 3 94328

Fixed submission:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
n,m,q = I2()
r = []
a = [0]*q
b = [0]*q
c = [0]*q
d = [0]*q
ans = []
import copy
def dfs(A):
    if len(A) == n+1:
        now = 0
        for i in range(q):
            if A[b[i]]-A[a[i]] == c[i]:now += d[i]
        ans.append(now)
        return
    A.append(A[-1])
    while (A[-1] <= m):
        dfs(copy.copy(A))
        A[-1] += 1
if __name__ == "__main__":
    for i in range(q):
        a[i],b[i],c[i],d[i] = I2()
    dfs([1])
    print(max(ans))
Buggy python submission (verdict: Runtime Error):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n, a, b = i2()
if a == 0 and b == 0:
    print(0):
elif a == 0:
    print(0)
elif b == 0:
    print(n)
else:
    cnt = n // (a+b)
    c = n%(a+b)
    if c <= a:
        print(a*cnt+c)
    else:
        print(a*cnt+c-b)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n, a, b = i2()

if a == 0:
    print(0)
elif b == 0:
    print(n)
else:
    cnt = n // (a+b)
    c = n % (a+b)
    if c <= a:
        print(a*cnt+c)
    else:
        print(a*cnt+c-(c-a))
Buggy python submission (verdict: Runtime Error):
import sys
import math
import itertools as it
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n ,m = i2()
l = [0]*n
for i in range(m):
    s,c = i2()
    if l[s-1] == 0 or l[s-1] == c:
        l[s-1] = c
    else:
        print(-1)
        exit()
num = ""
for i in l:
    num = num + str(i)
num = int(num)
print(num if len(str(num)) == n else -1)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass

n = i()
print(n//2 if n%2==0 else n//2+1)
Buggy python submission (verdict: Runtime Error):
import sys
import math
import itertools as it
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
s = [input() for _ in range(n)]
s.sort()
ss = list(set(s))
ss.sort()
a = [0]*len(ss)
i = 0
j = 0
while n-1 > i:
    if s[i] == s[i+1]:
        a[j] += 1
        i += 1
    else:
        i += 1
        j += 1
m = max(a)
for k in range(len(a)):
    if m == a[k]:
        print(ss[k])


Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
a = intl()
a = list(set(a))
if len(a) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import sys
import math
import itertools as it
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
s = [input() for _ in range(n)]
s.sort()
ss = list(set(s))
ss.sort()
a = [0]*len(ss)
i = 0
while n-1 > i:
    if s[i] == s[i+1]:
        a[ss.index(s[i])] += 1
        i += 1
    else:
        i += 1
m = max(a)
for k in range(len(a)):
    if a[k] == m:
        print(ss[k])


Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
a = intl()
a = list(set(a))
if len(a) == 2:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n ,k = i2()
p = intl()
def sx(n):
    return (n+1)/2

m = 0
pnt = 0
for i in range(0,n-k+1):
    s = sum(p[i:i+k])
    if s > m:
        m = s
        pnt = i
cnt = 0
for j in range(pnt,pnt+k):
    cnt += sx(p[j])
print(cnt)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
l = input().split()
s,t = l[0],l[1]
a ,b = i2()
u = input()
if s == u:
    print(a-1,b)
else:
    print(a,b-1)