Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(200000)

n = int(input())
edge = [[[] for i in range(2)] for j in range(n)]
dp = [-1] * n
for i in range(n - 1):
    a, b, c = map(int, input().split())
    edge[a - 1][0].append(b - 1)
    edge[a - 1][1].append(c)
    edge[b - 1][0].append(a - 1)
    edge[b - 1][1].append(c)


def distance(x, prev, d):
    dp[x] = d
    for i, j in zip(edge[x][0], edge[x][1]):
        if i == prev:
            continue
        if dp[i] != -1:
            continue
        distance(i, x, d + j)
    return

q, k = map(int, input().split())
k -= 1

ans = []
distance(k, -1, 0)
for i in range(q):
    x, y = map(int, input().split())
    ans.append(dp[x - 1] + dp[y - 1])

for i in range(q):
    print(ans[i])

Fixed submission:
import sys
sys.setrecursionlimit(200000)

n = int(input())
edge = [[[] for i in range(2)] for j in range(n)]
dp = [-1] * n
for i in range(n - 1):
    a, b, c = map(int, input().split())
    edge[a - 1][0].append(b - 1)
    edge[a - 1][1].append(c)
    edge[b - 1][0].append(a - 1)
    edge[b - 1][1].append(c)


def distance(x, prev, d):
    dp[x] = d
    for i, j in zip(edge[x][0], edge[x][1]):
        if i == prev:
            continue
        if dp[i] != -1:
            continue
        distance(i, x, d + j)
    return

q, k = map(int, input().split())
k -= 1

ans = []
distance(k, -1, 0)
for i in range(q):
    x, y = map(int, input().split())
    ans.append(dp[x - 1] + dp[y - 1])

for i in range(q):
    print(ans[i])

Buggy python submission (verdict: Runtime Error):
n = int(input())
edge = [[[] for i in range(2)] for j in range(n)]
dp = [-1] * n
for i in range(n - 1):
    a, b, c = map(int, input().split())
    edge[a - 1][0].append(b - 1)
    edge[a - 1][1].append(c)
    edge[b - 1][0].append(a - 1)
    edge[b - 1][1].append(c)


def distance(x, prev, d):
    dp[x] = d
    for i, j in zip(edge[x][0], edge[x][1]):
        if i == prev:
            continue
        if dp[i] != -1:
            continue
        distance(i, x, d + j)
    return

q, k = map(int, input().split())
k -= 1

ans = []
distance(k, -1, 0)
for i in range(q):
    x, y = map(int, input().split())
    ans.append(dp[x - 1] + dp[y - 1])

for i in range(q):
    print(ans[i])

Fixed submission:
import sys
sys.setrecursionlimit(200000)

n = int(input())
edge = [[[] for i in range(2)] for j in range(n)]
dp = [-1] * n
for i in range(n - 1):
    a, b, c = map(int, input().split())
    edge[a - 1][0].append(b - 1)
    edge[a - 1][1].append(c)
    edge[b - 1][0].append(a - 1)
    edge[b - 1][1].append(c)


def distance(x, prev, d):
    dp[x] = d
    for i, j in zip(edge[x][0], edge[x][1]):
        if i == prev:
            continue
        if dp[i] != -1:
            continue
        distance(i, x, d + j)
    return

q, k = map(int, input().split())
k -= 1

ans = []
distance(k, -1, 0)
for i in range(q):
    x, y = map(int, input().split())
    ans.append(dp[x - 1] + dp[y - 1])

for i in range(q):
    print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=list(map(int,input().split()))
b=[0]*N
c=[]
cnt=0
for i in range(1,N+1)[::-1]:
  if len([x for x in c if x%i==0])%2 != a[i-1]:
    a[i-1]=1
    c.append(i)
    cnt+=1
print(cnt)
if len(c)>0:
  print(*c,sep='\n')

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
b=[0]*N
c=[]
cnt=0
for i in range(1,N+1)[::-1]:
  if sum(b[i-1::i])%2 != a[i-1]:
    b[i-1]=1
    c.append(i)
    cnt+=1
print(cnt)
if len(c)>0:
  print(*c,sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a=list(map(int,input().split()))
b=[0]*N
c=[]
cnt=0
for i in range(1,N+1)[::-1]:
  if sum([x for x in b if x%i==0])%2 != a[i-1]:
    a[i-1]=1
    c.append(i)
    cnt+=1
print(cnt)
if len(c)>0:
  print(*c,sep='\n')

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
b=[0]*N
c=[]
cnt=0
for i in range(1,N+1)[::-1]:
  if sum(b[i-1::i])%2 != a[i-1]:
    b[i-1]=1
    c.append(i)
    cnt+=1
print(cnt)
if len(c)>0:
  print(*c,sep='\n')
Buggy python submission (verdict: Runtime Error):
N=int(input())
T, A=map(int, input().split())
N=list(map(int,input().split()))
temp=list(map(lambda x: abs(A-(T-0.006*x)),N))
temp.index(min(temp)+1)

Fixed submission:
N=int(input())
T, A=map(int, input().split())
N=list(map(int,input().split()))
temp1=list(map(lambda x: (T-0.006*x),N))
temp=list(map(lambda x: abs(A-(T-0.006*x)),N))
print(temp.index(min(temp))+1)
Buggy python submission (verdict: Runtime Error):
N=input()
A=list(map(int, input().split()))
A.sort()
print(A[N-1]-A[0])

Fixed submission:
N=int(input())
A=list(map(int, input().split()))
A.sort()
print(A[N-1]-A[0])
Buggy python submission (verdict: Runtime Error):
S=str(input())
N=int(700)
if S[0]=='o'
  N=N+100
if S[1]=='o'
  N=N+100
if S[2]=='o'
  N=N+100
print(N)

Fixed submission:
S=str(input())
N=int(700)
if S[0]=='o':
  N=N+100
if S[1]=='o':
  N=N+100
if S[2]=='o':
  N=N+100
print(N)
Buggy python submission (verdict: Runtime Error):
a,b,c,x,y=map(int, input().split())
cnta=0
cntb=0
cntc=0
if a+b>2*c:
  cntc=min(x,y) * 2
else:
  cnta=min(x,y)
  cntb=min(x,y)

if x>y:
  if a>2*c:
    cntc+=2*(x-y)
  else:
    cnta+=x-y
else:
  if b>2*c:
    cntc+=2*(y-x)
  else:
    cntb+=y-x

ptint(cnta*a+cntb*b+cntc*c)



Fixed submission:
A,B,C,X,Y=map(int, input().split())
cnta=0
cntb=0
cntc=0
if X>Y:
  if A+B>2*C:
    cntc+=2*Y
  else:
    cnta+=Y
    cntb+=Y
  if A>2*C:
    cntc+=2*(X-Y)
  else:
    cnta+=(X-Y)
else:
  if A+B>2*C:
    cntc+=2*X
  else:
    cnta+=X
    cntb+=X
  if B>2*C:
    cntc+=2*(Y-X)
  else:
    cntb+=(Y-X)

print(cnta*A+cntb*B+cntc*C)
Buggy python submission (verdict: Runtime Error):
N=int(input())
result={}
s=[]
t=[]
for i in range(N):
  s.append(input())
  if s[i] in result.keys():
    result[s[i]]+=1
  else:
    result[s[i]]=1
M=int(input())
for j in range(M):
  t.append(input())
  if t[j] in result.keys():
    result[t[j]]-=1
print(max(k for k in result.values() if k > 0))

Fixed submission:
N=int(input())
result={}
s=[]
t=[]
for i in range(N):
  s.append(input())
  if s[i] in result.keys():
    result[s[i]]+=1
  else:
    result[s[i]]=1
M=int(input())
for j in range(M):
  t.append(input())
  if t[j] in result.keys():
    result[t[j]]-=1
if max(result.values()) > 0:
  print(max(result.values()))
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
s=sorted(str(input()))
t=sorted(str(input()),reverse=True)
if s<t:
  print('Yes')
else:
  print('No')

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

Buggy python submission (verdict: Runtime Error):
s=sorted(str(input()))
t=sorted(str(input()),reverse=True)
if s<=t:
  print('Yes')
else:
  print('No')

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

Buggy python submission (verdict: Runtime Error):
s=sorted(str(input())
t=sorted(str(input(),reverse=True))
if s<=t:
  print('Yes')
else:
  print('No')

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

Buggy python submission (verdict: Runtime Error):
s=sorted(str(input()))
t=sorted(str(input(),reverse=True))
if s<=t:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b = map(int, input().split())
print(int((a+b+2-1)/2))
Buggy python submission (verdict: Runtime Error):
a = string(input())
n = int(0)
if a[0]=='1':
  n = n+1
if a[1]=='1':
  n = n+1
if a[2]=='1':
  n = n+1
print(n)


Fixed submission:
a = str(input())
n = int(0)
if a[0]=='1':
  n = n+1
if a[1]=='1':
  n = n+1
if a[2]=='1':
  n = n+1
print(n)
Buggy python submission (verdict: Runtime Error):
cnt_A=0
cnt_B=0
cnt_C=0
cnt_D=0
max_noudo=0
water=0
sugar=0
while cnt_A*100*A <= F:
  cnt_B=0
  while cnt_B*100*B <= F-cnt_A*100*A:
    cnt_C=0
    while cnt_C*C <= F-cnt_A*100*A-cnt_B*100*B:
      cnt_D=0
      while cnt_D*D <= F-cnt_A*100*A-cnt_B*100*B-cnt_C*C:
        if (cnt_A*A+cnt_B*B)*E >= cnt_C*C+cnt_D*D >0:
          if max_noudo < 100*(cnt_C*C+cnt_D*D)/(cnt_A*A+cnt_B*B):
            max_noudo = 100*(cnt_C*C+cnt_D*D)/(cnt_A*A+cnt_B*B)
            water=cnt_A*A*100+cnt_B*B*100+cnt_C*C+cnt_D*D
            sugar=cnt_C*C+cnt_D*D
          cnt_D+=1
        else:
          break
      cnt_C+=1
    cnt_B+=1
  cnt_A+=1

print(str(water)+' '+str(sugar))

Fixed submission:
A,B,C,D,E,F=map(int, input().split())
cnt_A=0
cnt_B=0
cnt_C=0
cnt_D=0
max_noudo=0
water=A*100
sugar=0
while cnt_A*100*A <= F:
  cnt_B=0
  while cnt_B*100*B <= F-cnt_A*100*A:
    cnt_C=0
    while cnt_C*C <= F-cnt_A*100*A-cnt_B*100*B:
      cnt_D=0
      while cnt_D*D <= F-cnt_A*100*A-cnt_B*100*B-cnt_C*C:
        if (cnt_A*A+cnt_B*B)*E >= cnt_C*C+cnt_D*D >0:
          if max_noudo < 100*(cnt_C*C+cnt_D*D)/(cnt_A*A+cnt_B*B):
            max_noudo = 100*(cnt_C*C+cnt_D*D)/(cnt_A*A+cnt_B*B)
            water=cnt_A*A*100+cnt_B*B*100+cnt_C*C+cnt_D*D
            sugar=cnt_C*C+cnt_D*D
        cnt_D+=1
      cnt_C+=1
    cnt_B+=1
  cnt_A+=1
 
print(water,sugar)
Buggy python submission (verdict: Runtime Error):
N=int(input())
n=0
while N>=2**n:
  n+=1
print(2**(n-1)

Fixed submission:
N=int(input())
n=0
while N>=2**n:
  n+=1
print(2**(n-1))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
n=0
while N>=2**n:
  n=+1
print(2**(n-1))

Fixed submission:
N=int(input())
n=0
while N>=2**n:
  n+=1
print(2**(n-1))
Buggy python submission (verdict: Runtime Error):
r,g,b = map(int, input().split())
if (r*100+g*10+b)%%4 == 0:
  print('YES')
else:
  print('NO')

Fixed submission:
r,g,b = map(int, input().split())
if (r*100+g*10+b)%4 == 0:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split())
kazu = len([x for x in A if x%2 == 1])
if kazu%2==1:
  print('NO')
else:
  print('YES')

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
kazu = len([x for x in A if x%2 == 1])
if kazu%2==1:
  print('NO')
else:
  print('YES')
Buggy python submission (verdict: Time Limit Exceeded):
K,S=map(int, input().split())
cnt=0
for i in range(K+1):
  X=i
  for j in range(K+1):
    Y=j
    if S-(X+Y)in range(K+1):
      cnt+=1
print(cnt)

Fixed submission:
K,S=map(int, input().split())
cnt=0
if K <= S:
  for i in range(K+1):
    for j in range(K+1):
      if S - (i+j) <= K and S >= i+j:
        cnt += 1
else:
  for i in range(S+1):
    for j in range(S+1):
      if S - (i+j) <= K and S >= i+j:
        cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
K,S=map(int, input().split())
cnt=0
for i in range(K+1):
  X=i
  for j in range(K+1):
    Y=j
    for k in range(K+1):
      Z=k
      if X+Y+Z==S:
        cnt+=1
print(cnt)

Fixed submission:
K,S=map(int, input().split())
cnt=0
if K <= S:
  for i in range(K+1):
    for j in range(K+1):
      if S - (i+j) <= K and S >= i+j:
        cnt += 1
else:
  for i in range(S+1):
    for j in range(S+1):
      if S - (i+j) <= K and S >= i+j:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
for i in range(N):
        A.append(int(input()))
m = max(A)
for i in range(N):
        if A[i] == m:
                A.remove(m)
                print(max(A))
                A.insert(i,m)
        else:
                print(m)

Fixed submission:
N = int(input())
A = []
for i in range(N):
        A.append(int(input()))
m = max(A)
n = A.index(m)
A.remove(m)
m1 = max(A)
for i in range(n):
        print(m)
print(m1)
for i in range(N-1-n):
        print(m)
Buggy python submission (verdict: Runtime Error):
import math
A,B,C,D = map(int,input().rstrip().split(' '))
x = (B // C) - ((A-1) // C)
y =  (B // D) - ((A-1) // D)
E = (C * D) // math.gcd(C,D)
z = (B // E) - ((A-1) // E)
print((B-A+1)-(x+y-z))

Fixed submission:
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a


A,B,C,D = map(int,input().rstrip().split(' '))
x = (B // C) - ((A-1) // C)
y =  (B // D) - ((A-1) // D)
E = (C * D) // gcd(C,D)
z = (B // E) - ((A-1) // E)
print((B-A+1)-(x+y-z))
Buggy python submission (verdict: Runtime Error):
a,b,x,y = input().rstrip().split(' ')
r = 0
if x + x == a and y + y == b:
    r = 1
print(a*b/2,r)

Fixed submission:
a,b,x,y = map(int,input().rstrip().split(' '))
r = 0
if x + x == a and y + y == b:
    r = 1
print(a*b/2,r)
Buggy python submission (verdict: Runtime Error):
import math

def lcm(x,y):
  return (x*y) // math.gcd(x,y)

A,B,C,D = [int(x) for x in input().split(' ')]
a = (B - A + 1) 
b = ((B // C) - ((A-1) // C))
c = ((B // D) - ((A-1) // D))
CD = lcm(C,D)
d = ((B // (CD)) - ((A-1) // (CD)))
q = a - b - c + d
print(q)

Fixed submission:
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
  
def lcm(a, b):
	return a * b // gcd (a, b)

A,B,C,D = [int(x) for x in input().split(' ')]
a = (B - A + 1) 
b = ((B // C) - ((A-1) // C))
c = ((B // D) - ((A-1) // D))
CD = lcm(C,D)
d = ((B // (CD)) - ((A-1) // (CD)))
q = a - b - c + d
print(q)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = [int(x) for x in input().split(' ')]

P = {}
for i in range(M):
  l,r = [int(x) for x in input().split(' ')]
  for s in range(l,r+1):
    if s not in P:
      P[s] = 0
    P[s] += 1
    #print(s)
    
cnt = 0
for k,v in P.items():
  if v == M:
    cnt += 1
print(cnt)

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

L = 0
R = N
for i in range(M):
  l,r = [int(x) for x in input().split(' ')]
  if L < l:
    L = l
  if r < R:
    R = r

cnt = 0
if L <= R:
  cnt = R - L + 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
N,K = [int(x) for x in input().split(' ')]

return N - (K - 1)


Fixed submission:
N,K = [int(x) for x in input().split(' ')]
ans = N - (K-1)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(x) for x in input().split(' ')]

s = 0
mc = 0
for i in A:
  if i <= 0:
    mc += 1
  s += abs(i)

if (mc % 2 == 1):
  mv = min(A[0],A[-1])
  #print('mv',mv)
  s -= mv*2
print(s)

Fixed submission:
A,B,T = [int(x) for x in input().split(' ')]
print(int(B * ((T + 0.5) // A)))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-10
#

# Usage
#
"""

def read_value():
    first_line = input()
    status = first_line.split(" ")

    num_of_contestant = status[0]
    basis = status[1]
    oversea_limit = status[2]

    second_line = input()
    rank_str = second_line

    return [num_of_contestant, basis, oversea_limit, rank_str]


def check_japan(rank, basis, oversea_limit):
    if rank < basis + oversea_limit:
        return "Yes"
    else:
        return "No"

def check_overseas(rank, oversea_rank, basis, oversea_limit):
    if rank < basis + oversea_limit and oversea_rank < oversea_limit:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    input_items = read_value()

    basis = input_items[1]
    oversea_limit = input_items[2]
    rank_str = input_items[3]

    oversea_rank = 0

    for rank, type in enumerate(rank_str):
        if type == "a":
            print(check_japan(rank, basis, oversea_limit))

        if type == "b":
            oversea_rankt += 1
            print(check_overseas(rank, oversea_rank, basis, oversea_limit))

        if type == "c":
            print("No")






Fixed submission:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-10
#

# Usage
#
"""

def read_value():
    first_line = input()
    status = first_line.split(" ")

    num_of_contestant = int(status[0])
    basis = int(status[1])
    oversea_limit = int(status[2])

    second_line = input()
    rank_str = second_line

    return [num_of_contestant, basis, oversea_limit, rank_str]


def check_japan(rank, basis, oversea_limit):
    if rank < basis + oversea_limit:
        return "Yes"
    else:
        return "No"

def check_overseas(rank, oversea_rank, basis, oversea_limit):
    if rank < basis + oversea_limit and oversea_rank <= oversea_limit:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    input_items = read_value()

    basis = input_items[1]
    oversea_limit = input_items[2]
    rank_str = input_items[3]

    oversea_rank = 0
    passed = 0

    for rank, type in enumerate(rank_str):
        if type == "a":
            if check_japan(passed, basis, oversea_limit) == "Yes":
                print("Yes")
                passed += 1
            else:
                print("No")

        if type == "b":
            oversea_rank += 1
            if check_overseas(passed, oversea_rank, basis, oversea_limit) == "Yes":
                print("Yes")
                passed += 1
            else:
                print("No")

        if type == "c":
            print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-09-28
#

# Usage
#
"""
import sys

def input_single_line():
    """Receive Inputs."""
    return input()

def input_two_line():
    """Receive Two Lined Inputs.
    Like this.

    N
    1 2 3 4 5
    """
    sys.stdin.readline()
    target = sys.stdin.readline()
    target = target.rstrip("\n")
    target = target.split(" ")

    return target


def search_lovers(target_list: list) -> None:
    """Search Simple."""
    lovers = []
    for i in target_list:
        pos = int(i)
        if target_list[pos-1] == pos-1:
            lovers.append(pos-1)

    print(len(lovers))


if __name__ == "__main__":
    import doctest
    doctest.testmod()

    target = input_two_line()

    search_lovers(target)



Fixed submission:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-09-28
#

# Usage
#
"""
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import

def input_process():
    """Receive Inputs."""
    return input()


def insert_space(target_str: str) -> str:
    """
    >>> insert_space("codefestival")
    code festival
    """
    return target_str[0:4] + " " + target_str[4:]

if __name__ == "__main__":
    target = input()

    print(insert_space(target))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-09-28
#

# Usage
#
"""
import sys

def input_single_line():
    """Receive Inputs."""
    return input()

def input_two_line():
    """Receive Two Lined Inputs.
    Like this.

    N
    1 2 3 4 5
    """
    sys.stdin.readline()
    target = sys.stdin.readline()
    target = target.rstrip("\n")
    target = target.split(" ")

    return target


def search_lovers(target_list: list) -> None:
    """Search Simple."""
    lovers = []
    for i in target_list:
        if target_list[i-1] == i-1:
            lovers.append(i-1)

    print(len(lovers))


if __name__ == "__main__":
    import doctest
    doctest.testmod()

    target = input_two_line()

    search_lovers(target)



Fixed submission:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-09-28
#

# Usage
#
"""
import sys

def input_single_line():
    """Receive Inputs."""
    return input()

def input_two_line():
    """Receive Two Lined Inputs.
    Like this.

    N
    1 2 3 4 5
    """
    sys.stdin.readline()
    target = sys.stdin.readline()
    target = target.rstrip("\n")
    target = target.split(" ")

    return target


def search_lovers(target_list: list) -> None:
    """Search Simple.
    >>> target_list = [2, 3, 1]
    >>> search_lovers(target_list)
    0
    >>> target_list = [2, 1, 4, 3]
    >>> search_lovers(target_list)
    2
    >>> target_list = [5, 5, 5, 5, 1]
    >>> search_lovers(target_list)
    1
    """
    target_list = [int(i) - 1 for i in target_list]
    lovers = []
    ans = 0
    for i, n in enumerate(target_list):
        if target_list[n] == i:
            ans = ans + 1

    print(int(ans/2))


if __name__ == "__main__":
    import doctest
    doctest.testmod()

    target = input_two_line()

    search_lovers(target)
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
if a * b % 2 == 0:
    print("True")
else:
    print("False")

Fixed submission:
a, b = map(int, input().split())
 
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
s1, s2, s3 = map(int, input().split())
print(s1 + s2 + s3)

Fixed submission:
s1, s2, s3 = map(int, input())
print(s1 + s2 + s3)
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
result = 0

root = math.ceil(math.sqrt(N))
for i in range(root):
    if N % i  == 0:
        result += (N // i)  - 1

print(result)


Fixed submission:
import math
N = int(input())
result = 0

root = math.ceil(math.sqrt(N))
for i in range(root):
    if N % (i + 1) == 0 and (i + 1) + 1 < N // (i + 1):
        result += N // (i + 1) - 1

print(result)

Buggy python submission (verdict: Runtime Error):

import math
N = int(input())
result = 0

root = math.ceil(math.sqrt(N))
for i in range(root):
    if N % i  == 0:
        result += N // i  - 1

print(result)

Fixed submission:
import math
N = int(input())
result = 0

root = math.ceil(math.sqrt(N))
for i in range(root):
    if N % (i + 1) == 0 and (i + 1) + 1 < N // (i + 1):
        result += N // (i + 1) - 1

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

N = input()
charlist = list(N)
hoge = 0
maxscore = 0
def onon(char, hogehoge):
    nowscore = 0
    while char[hogehoge] == "A" or char[hogehoge] == "T" or char[hogehoge] == "G" or char[hogehoge] == "C" :
        hogehoge = hogehoge + 1
        nowscore += 1
    return nowscore 
for i in charlist:
    score = 0
    if i == "A" or i == "T" or i == "G" or i == "C"  :
        score = onon(charlist,hoge)
    if maxscore <= score:
        maxscore = score
    hoge = hoge + 1
print(maxscore)


Fixed submission:
N = input()
charlist = list(N)
hoge = 0
maxscore = 0
def onon(char, hogehoge):
    nowscore = 0
    while char[hogehoge] == "A" or char[hogehoge] == "T" or char[hogehoge] == "G" or char[hogehoge] == "C" :
        hogehoge = hogehoge + 1
        nowscore += 1
        if hogehoge  >= len(char):
            break
    return nowscore 
for i in charlist:
    score = 0
    if i == "A" or i == "T" or i == "G" or i == "C"  :
        score = onon(charlist,hoge)
    if maxscore <= score:
        maxscore = score
    hoge = hoge + 1
print(maxscore)