Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
a, b, c, d = map(int, input().split)
l = a+b
r = c+d
if l > r:
    print("Left")
elif l < r:
    print("Right")
else:
    print("Balanced")

Fixed submission:
# -*- coding:utf-8 -*-
a, b, c, d = map(int, input().split())
l = a+b
r = c+d
if l > r:
    print("Left")
elif l < r:
    print("Right")
else:
    print("Balanced")
Buggy python submission (verdict: Runtime Error):
<?php
fscanf(STDIN, "%s %s", $x, $y);
$factors = [];
for ($tmp = 0; $tmp < 6; $tmp++){
    $factors[chr(ord('A')+$tmp)] = $tmp+10;
}
if ($factors[$x] < $factors[$y]){
    print "<\n";
} else if($factors[$x] > $factors[$y]){
    print ">\n";
} else {
    print "=\n";
}
?>

Fixed submission:
# -*- coding:utf-8 -*-
d = { 'A':10, 'B':11, 'C':12, 'D':13, 'E':14, 'F':15 }
x, y = input().split()
if d[x] > d[y]:
    print(">")
elif d[x] < d[y]:
    print("<")
else:
    print("=")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
import sys
N = int(input())
A = list(map(int, input().split()))
a = list(reversed(sorted(list(set(A)))))
width = -1
height = -1
candinate = []
for tmp in a:
    b = A.count(tmp)
    if b >= 4:
        if width == -1:
            width = tmp
        if height == -1:
            height = tmp
    elif b >= 2:
        if width == -1:
            width = tmp
            b = 0
        if height == -1 and b != 0:
            height = tmp
    else:
        pass
    if width != -1 and height != -1:
        print(width*height)
        sys.exit()
print(0)

Fixed submission:
# -*- coding:utf-8 -*-
import sys
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
a = Counter(A)
width = -1
height = -1
candinate = []
for tmp in reversed(sorted(list(set(A)))):
    b = a[tmp]
    if b >= 4:
        if width == -1:
            width = tmp
        if height == -1:
            height = tmp
    elif b >= 2:
        if width == -1:
            width = tmp
            b = 0
        if height == -1 and b != 0:
            height = tmp
    else:
        pass
    if width != -1 and height != -1:
        print(width*height)
        sys.exit()
print(0)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
def euc(a,b):
    if b == 0:
        return a
    else:
        return euc(b, a%b)

N = int(input())
T = [ int(input()) for tmp in range(N) ]
if len(T) > 1:
    a = T.pop()
    b = T.pop()
    lcm = a*b/euc(a,b)
    for tmp in T:
        lcm = tmp*lcm/euc(tmp,lcm)
    print(int(lcm))
else:
    print(T.pop())

Fixed submission:
# -*- coding:utf-8 -*-
def euc(a,b):
    if b == 0:
        return a
    else:
        return euc(b, a%b)

N = int(input())
T = [ int(input()) for tmp in range(N) ]
if len(T) > 1:
    a = T.pop()
    b = T.pop()
    lcm = a*b//euc(a,b)
    for tmp in T:
        lcm = tmp*lcm//euc(tmp,lcm)
    print(lcm)
else:
    print(T.pop())
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
b = [ tmp for tmp in a if tmp%4 == 0 ]
c = [ tmp for tmp in a if tmp%2 == 0 and tmp not in b ]
d = [ tmp for tmp in a if tmp%2 != 0 ]
if len(c) != 0 and len(b)-len(d) >= 0:
    print("Yes")
elif len(c) == 0 and len(b)+1 >= len(d):
    print("Yes")
else:
    print("No")

Fixed submission:
# -*- coding:utf-8 -*-
N = int(input())
factor = 0
a = list(map(int, input().split()))
b = [ tmp for tmp in a if tmp%4 == 0 ]
c = [ tmp for tmp in a if tmp%2 == 0 ]
d = [ tmp for tmp in a if tmp%2 != 0 ]
if len(c)-len(b) != 0 and len(b)-len(d) >= 0:
    print("Yes")
elif len(c)-len(b) == 0 and len(b)+1 >= len(d):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
b = sum(a)
minimum = float('inf')
for tmp in range(1,N):
    c = sum(a[tmp:len(a)])
    d = abs(b-2*c)
    minimum = min(minimum, d)
print(minimum)

Fixed submission:
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
b = sum(a)
c = 0
minimum = float('inf')
for tmp in range(0,N-1):
    c += a[tmp]    
    d = abs(c-(b-c))
    minimum = min(minimum, d)
print(minimum)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
minimum = float('inf')
for tmp in range(1,N):
    b = abs(sum(a[0:tmp])-sum(a[tmp:len(a)]))
    minimum = min(minimum, b)
print(minimum)

Fixed submission:
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
b = sum(a)
c = 0
minimum = float('inf')
for tmp in range(0,N-1):
    c += a[tmp]    
    d = abs(c-(b-c))
    minimum = min(minimum, d)
print(minimum)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
def odd(num):
    return True if num%2!=0 else False
n = int(input())
a = list(input().split())
b = []
for tmp in range(len(a)):
    if odd(n) == odd(tmp+1):
        if len(b) != 0:
            b.insert(0,a[tmp])
        else:
            b.append(a[tmp])
    else:
        b.append(a[tmp])
print(' '.join(b))

Fixed submission:
# -*- coding:utf-8 -*-
from collections import deque
def odd(num):
    return True if num%2!=0 else False
n = int(input())
a = list(input().split())
b = deque()
for tmp in range(len(a)):
    if odd(n) == odd(tmp+1):
        b.appendleft(a[tmp])
    else:
        b.append(a[tmp])
print(' '.join(b))

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
def odd(num):
    return True if num%2!=0 else False
n = int(input())
a = list(map(int,input().split()))
b = []
for tmp in range(len(a)):
    if odd(n) == odd(tmp+1):
        if len(b) != 0:
            b.insert(0,a[tmp])
        else:
            b.append(a[tmp])
    else:
        b.append(a[tmp])
b = map(str,b)
print(' '.join(b))

Fixed submission:
# -*- coding:utf-8 -*-
from collections import deque
def odd(num):
    return True if num%2!=0 else False
n = int(input())
a = list(input().split())
b = deque()
for tmp in range(len(a)):
    if odd(n) == odd(tmp+1):
        b.appendleft(a[tmp])
    else:
        b.append(a[tmp])
print(' '.join(b))

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
n = int(input())
a = list(map(int,input().split()))
for tmp in range(1,len(a)):
    a[0:tmp+1] = reversed(a[0:tmp+1])
a = map(str,a)
print(" ".join(a))

Fixed submission:
# -*- coding:utf-8 -*-
from collections import deque
def odd(num):
    return True if num%2!=0 else False
n = int(input())
a = list(input().split())
b = deque()
for tmp in range(len(a)):
    if odd(n) == odd(tmp+1):
        b.appendleft(a[tmp])
    else:
        b.append(a[tmp])
print(' '.join(b))

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
n = int(input())
a = list(map(int,input().split()))
b = []
for tmp in a:
    b.append(tmp)
    b = list(reversed(b))
b = map(str,b)
print(" ".join(b))

Fixed submission:
# -*- coding:utf-8 -*-
from collections import deque
def odd(num):
    return True if num%2!=0 else False
n = int(input())
a = list(input().split())
b = deque()
for tmp in range(len(a)):
    if odd(n) == odd(tmp+1):
        b.appendleft(a[tmp])
    else:
        b.append(a[tmp])
print(' '.join(b))

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
n = int(input())
a = list(map(int,input().split()))
b = []
for tmp in a:
    b.append(tmp)
    b.reverse()
b = map(str,b)
print(" ".join(b))

Fixed submission:
# -*- coding:utf-8 -*-
from collections import deque
def odd(num):
    return True if num%2!=0 else False
n = int(input())
a = list(input().split())
b = deque()
for tmp in range(len(a)):
    if odd(n) == odd(tmp+1):
        b.appendleft(a[tmp])
    else:
        b.append(a[tmp])
print(' '.join(b))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
import sys
N = int(input())
a = [ int(input()) for tmp in range(N) ]
ans = 0
index = 0
while True:
    sav = index #last index
    index = a[sav]-1 #new index
    ans += 1
    if index == 1:
        break
    if a[index] == sav+1: #Loop
        print("-1")
        sys.exit()
print(ans)

Fixed submission:
# -*- coding:utf-8 -*-
import sys
N = int(input())
a = [ int(input()) for tmp in range(N) ]
ans = 0
index = 0
while ans < len(a):
    sav = index #last index
    index = a[sav]-1 #new index
    ans += 1
    if index == 1:
        print(ans)
        sys.exit()
    if a[index] == sav+1: #Loop
        print("-1")
        sys.exit()
print("-1")
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
rate = [ 0 for tmp in range(9) ]
factor = 0
empty = 0
for tmp in range(N):
    if 1 <= a[tmp] and  a[tmp] <= 399:
        rate[0] += 1
    elif 400 <= a[tmp] and a[tmp] <= 799:
        rate[1] += 1
    elif 800 <= a[tmp] and a[tmp] <= 1199:
        rate[2] += 1
    elif 1200 <= a[tmp] and a[tmp] <= 1599:
        rate[3] += 1
    elif 1600 <= a[tmp] and a[tmp] <= 1999:
        rate[4] += 1
    elif 2000 <= a[tmp] and a[tmp]<= 2399:
        rate[5] += 1
    elif 2400 <= a[tmp] and a[tmp] <= 2799:
        rate[6] += 1
    elif 2800 <= a[tmp] and a[tmp] <= 3199:
        rate[7] += 1
    else:
        rate[8] += 1
for tmp in range(len(rate)-1):
    if rate[tmp] > 0:
        factor += 1
    else:
        empty += 1
if rate[8] > 0:
    if factor == 0:
        print("1 "+str(rate[8])
    else:
        print(str(factor)+' '+str(factor+rate[8]))
else:
    print(str(factor)+' '+str(factor))

Fixed submission:
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
rate = [ 0 for tmp in range(9) ]
factor = 0
empty = 0
for tmp in range(N):
    if 1 <= a[tmp] and  a[tmp] <= 399:
        rate[0] += 1
    elif 400 <= a[tmp] and a[tmp] <= 799:
        rate[1] += 1
    elif 800 <= a[tmp] and a[tmp] <= 1199:
        rate[2] += 1
    elif 1200 <= a[tmp] and a[tmp] <= 1599:
        rate[3] += 1
    elif 1600 <= a[tmp] and a[tmp] <= 1999:
        rate[4] += 1
    elif 2000 <= a[tmp] and a[tmp]<= 2399:
        rate[5] += 1
    elif 2400 <= a[tmp] and a[tmp] <= 2799:
        rate[6] += 1
    elif 2800 <= a[tmp] and a[tmp] <= 3199:
        rate[7] += 1
    else:
        rate[8] += 1
for tmp in range(len(rate)-1):
    if rate[tmp] > 0:
        factor += 1
    else:
        empty += 1
if rate[8] > 0:
    if factor == 0:
        print("1 "+str(rate[8]))
    else:
        print(str(factor)+' '+str(factor+rate[8]))
else:
    print(str(factor)+' '+str(factor))
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = []
for tmp in range(N):
    s.append(int(input()))
s.sort()
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            total += tmp
    print(0)

Fixed submission:
# -*- coding:utf-8 -*-
a = sum(list(map(int,input().split())))
if a >= 10:
    print("error")
else:
    print(a)

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = sorted([ int(input()) for tmp in range(N) ])
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            pass
    print(0)

Fixed submission:
# -*- coding:utf-8 -*-
a = sum(list(map(int,input().split())))
if a >= 10:
    print("error")
else:
    print(a)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = sorted([ int(input()) for tmp in range(N) ])
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            pass
    print(0)
[Shellingford:

Fixed submission:
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = []
for tmp in range(N):
    s.append(int(input()))
s.sort()
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            total += tmp
    print(0)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import math
N = int(input())
a = list(set([max(int(math.log10(N//B))+1,int(math.log10(B))+1) for B in range(1,int(math.sqrt(N+1))) if N%B == 0 ]))
a.sort()
print(min(a))

Fixed submission:
# -*- coding:utf-8 -*-
import math
N = int(input())
print(min(sorted(list(set([max(int(math.log10(N//B))+1,int(math.log10(B))+1) for B in range(1,int(math.sqrt(N+1))+1) if N%B == 0])))))

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import math
N = int(input())
print(sorted(list(set([max(int(math.log10(N//B))+1,int(math.log10(B))+1) for B in range(1,int(math.sqrt(N+1))) if N%B == 0 ]))).pop(0))

Fixed submission:
# -*- coding:utf-8 -*-
import math
N = int(input())
print(min(sorted(list(set([max(int(math.log10(N//B))+1,int(math.log10(B))+1) for B in range(1,int(math.sqrt(N+1))+1) if N%B == 0])))))
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
def search(t, x, i):
#    print('t:'+str(t)+' x:'+str(x)+' i:'+str(i))
    global X
#    print(l)
#    print('X:'+str(X))
    if x == X:
        #l.append(t)
        return t
    elif x > X:
        ans1 = search(i, x, i+1)
        ans2 = search(i, x-i, i+1)
        return min(ans1, ans2)
    else:
        ans3 = search(i, x+i, i+1)
        return ans3


X = int(input())
ans = search(0, 0, 1)
print(ans)

Fixed submission:
# -*- coding:utf-8 -*-
'''
def search(t, x, i):
    global X
    if x == X:
        return t
    elif x > X:
        ans1 = search(i, x, i+1)
        ans2 = search(i, x-i, i+1)
        return min(ans1, ans2)
    else:
        ans3 = search(i, x+i, i+1)
        return ans3
'''
X = int(input())
p, i = (0,0)
while True:
    p += i
    i += 1
    if p >= X:
        break
print(i-1)
'''
ans = search(0, 0, 1)
print(ans)
'''
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
N, M = map(int, input().split())
if M > 0:
    if N*2 <= M:
        print((N+M//2)//2)
    else:
        ans = 0
        while True:
            N -= 1
            M -= 2
            if M >= 0 and N >= 0:
               ans += 1
            else:
                break
        print(ans)
else:
    print(0)

Fixed submission:
# -*- coding:utf-8 -*-
N, M = map(int, input().split())
if M > 0:
    if N*2 <= M:
        print((N+M//2)//2)
    else:
        print(M//2)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
int main(void){
    long long int N, M;
    scanf("%lld %lld", &N, &M);
    long long int ans = (N+M/2)/2;
    printf("%lld\n", ans);
    return 0;
}

Fixed submission:
# -*- coding:utf-8 -*-
N, M = map(int, input().split())
if M > 0:
    if N*2 <= M:
        print((N+M//2)//2)
    else:
        print(M//2)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
K,S = map(int, input().split())
ans = 0
for x in range (0, K+1):
    for y in range (0, K+1):
        for z in range (0, K+1):
            if x+y+z == S:
                ans += 1

print(ans)

Fixed submission:
# -*- coding:utf-8 -*-
K,S = map(int, input().split())
ans = 0

"""
for x in range (0, K+1):
    for y in range (0, K+1):
        for z in range (0, K+1):
            if S == x+y+z:
                ans += 1
"""

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

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
N = int(input())
TA = []
counter = 0
for tmp in range (N):
    TA.append(list(map(int,input().split())))

whole = TA[0][0] + TA[0][1] #総和
for tmp in range (1,N):
    counter = 0
    tmp2 = TA[tmp][0]+TA[tmp][1]
    before = whole/(TA[tmp-1][0]+TA[tmp-1][1]) #比の数値1が何票か。
    while True:
        if (whole+counter)%tmp2 != 0:
            counter += tmp2 - (whole+counter)%tmp2
        whole += counter
        if (before*TA[tmp-1][0] > ((whole/tmp2)*TA[tmp][0]) or (before*TA[tmp-1][1] > ((whole/tmp2)*TA[tmp][1]))):
            counter = 1
            continue
        else:
            break
print(whole)

Fixed submission:
# -*- coding:utf-8 -*-
import math
from decimal import *
N = int(input())
A, B = (1, 1)
for tmp in range (N):
    t, a = map(int,input().split())
    n = Decimal(max([math.ceil(A/t),math.ceil(B/a)]))
    A = n*t
    B = n*a
print(A+B)
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if k >= a:
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    if ord('z') >= ord(s[len(s)-1])+k:
        s[len(s)-1] = chr(ord(s[len(s)-1])+k)
    else:
        s[len(s)-1] = chr((ord(s[len(s)-1])+k)-26)
print(''.join(s))

Fixed submission:
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if s[tmp] != 'a' and k >= a: 
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    s[len(s)-1] = chr((ord(s[len(s)-1])+k%26))
print(''.join(s))

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if k >= a:
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    if ord('z') >= ord(s[len(s)-1])+k:
        s[len(s)-1] = chr(ord(s[len(s)-1])+k)
    else:
        s[len(s)-1] = chr(ord('a')+(26-(ord(s[len(s)-1])+k)-1))
print(''.join(s))

Fixed submission:
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if s[tmp] != 'a' and k >= a: 
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    s[len(s)-1] = chr((ord(s[len(s)-1])+k%26))
print(''.join(s))
Buggy python submission (verdict: Runtime Error):
N,T = map(int,input().split())
ans = 1001
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= ans:
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Fixed submission:
n,o = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= o and c <= ans:
    ans =  c
if ans == 1001 : print("TLE")
else : print(ans)

Buggy python submission (verdict: Runtime Error):
ans = 1001
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= ans:
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Fixed submission:
n,o = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= o and c <= ans:
    ans =  c
if ans == 1001 : print("TLE")
else : print(ans)

Buggy python submission (verdict: Runtime Error):
ans = 1001
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= ans
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Fixed submission:
n,o = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= o and c <= ans:
    ans =  c
if ans == 1001 : print("TLE")
else : print(ans)

Buggy python submission (verdict: Runtime Error):
ans = 1001
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= T
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Fixed submission:
n,o = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= o and c <= ans:
    ans =  c
if ans == 1001 : print("TLE")
else : print(ans)

Buggy python submission (verdict: Runtime Error):
ans = []
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T:
    ans = min(anc,c)
  if not a:
    print("TLE")

Fixed submission:
n,o = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= o and c <= ans:
    ans =  c
if ans == 1001 : print("TLE")
else : print(ans)
Buggy python submission (verdict: Runtime Error):
N = input()

if N==1:
	print ("Hello World")
elif N==2:
 	N1 = input()
	N2 = input()
	print (N1+N2)


Fixed submission:
N = int(input())

if N==1:
 print ("Hello World")
elif N==2:
 N1 = int(input())
 N2 = int(input())
 print (N1+N2)

Buggy python submission (verdict: Runtime Error):
N = input()
N1 = input()
N2 = input()

if N==1:
  print ("Hello World")
elif N==1:
  print (N1+N2)

Fixed submission:
N = int(input())

if N==1:
 print ("Hello World")
elif N==2:
 N1 = int(input())
 N2 = int(input())
 print (N1+N2)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

judge=0
for i in range(1,4):
	if (j+k+i)*2==1:
      judge=1
if judge==1:
  print ("Yes")
else:
  print ("No")

Fixed submission:
A, B = map(int, input().split())

judge=0
for C in range(1,4):
  if (A*B*C)%2==1:
    judge=1

if judge==1:
  print ("Yes")
else:
  print ("No")

Buggy python submission (verdict: Runtime Error):
judge=0
j,k=A,B
for i in range(1,4):
	if (j+k+i)*2==1:
      judge=1
if judge==1:
  print ("Yes")
else:
  print ("No")

Fixed submission:
A, B = map(int, input().split())

judge=0
for C in range(1,4):
  if (A*B*C)%2==1:
    judge=1

if judge==1:
  print ("Yes")
else:
  print ("No")

Buggy python submission (verdict: Runtime Error):
judge=0
for i in range(1,4):
	if (A+B+i)*2==1:
      judge=1
if judge==1:
  print ("Yes")
else:
  print ("No")

Fixed submission:
A, B = map(int, input().split())

judge=0
for C in range(1,4):
  if (A*B*C)%2==1:
    judge=1

if judge==1:
  print ("Yes")
else:
  print ("No")
Buggy python submission (verdict: Runtime Error):
num_word = int(input())
word_list=[]
word_list = [[int(i) for i in input().split()] for i in range(n)] 

word_list_temp=[]
for j in range(len(word_list)):
  if j == len(word_list)-1:
    print ("Yes")
    break
  else:
    old_word=word_list[j]
    old_word_sep=list(old_word)
    word_list_temp.append(old_word)
    new_word=word_list[j+1]
    new_word_sep=list(word_list[j+1])
    if old_word_sep[len(old_word)-1]!=new_word_sep[0]:
      print ("No")
      break
    elif new_word in list(word_list_temp):
      print ("No")
      break
    else:
      continue

Fixed submission:
num_word = int(input())
word_list=[]
word_list = [str(input()) for i in range(num_word)] 
 
word_list_temp=[]
for j in range(len(word_list)):
  if j == len(word_list)-1:
    print ("Yes")
    break
  else:
    old_word=word_list[j]
    old_word_sep=list(old_word)
    word_list_temp.append(old_word)
    new_word=word_list[j+1]
    new_word_sep=list(word_list[j+1])
    if old_word_sep[len(old_word)-1]!=new_word_sep[0]:
      print ("No")
      break
    elif new_word in list(word_list_temp):
      print ("No")
      break
    else:
      continue
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int, input().split())
l = m//n
for i in range(l,0,-1):
  if m % i == 0:
    print(i) 
    break

Fixed submission:
n,m = map(int, input().split())
l = m // n
ans = 0
for i in range(int(m**0.5),0,-1):
  if m % i == 0 and m // i >= n:
    if i > ans: ans = i
    d = m // i
    if  m // d >= n and d > ans: ans = d
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int, input().split())
l = m//n
for i in range(l,0,-1):
  if m % i == 0 and m // i >= n:
    print(i) 
    break

Fixed submission:
n,m = map(int, input().split())
l = m // n
ans = 0
for i in range(int(m**0.5),0,-1):
  if m % i == 0 and m // i >= n:
    if i > ans: ans = i
    d = m // i
    if  m // d >= n and d > ans: ans = d
print(ans)