Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np

a,b = map(int,input().split())

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

print(lcm(a,b))

Fixed submission:
a,b = map(int,input().split())
 
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a


def lcm(a,b):
    return a*b//gcd(a,b)

print(lcm(a,b))

Buggy python submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())

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

print(lcm(a,b))

Fixed submission:
a,b = map(int,input().split())
 
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a


def lcm(a,b):
    return a*b//gcd(a,b)

print(lcm(a,b))
Buggy python submission (verdict: Time Limit Exceeded):
import sys

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

number = 1
count = 0

if 1 not in nums:
    print(-1)
    sys.exit()

while len(nums) > 0:
    try:
        idx = nums.index(number)
    except ValueError:
        count += len(nums)
        break
    count += idx
    nums = nums[idx+1:]
    number += 1

print(count)


Fixed submission:
import sys

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

number = 1
count = 0

if 1 not in nums:
    print(-1)
    sys.exit()

for num in nums:
    if num == number:
        number += 1
    else:
        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
import sys

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

number = 1
count = 0

if 1 not in nums:
    print(-1)
    sys.exit()

while len(nums) > 0:
    try:
        idx = nums.index(number)
    except ValueError:
        break
    count += idx
    nums = nums[idx+1:]
    print(nums)
    number += 1

print(count)

Fixed submission:
import sys

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

number = 1
count = 0

if 1 not in nums:
    print(-1)
    sys.exit()

for num in nums:
    if num == number:
        number += 1
    else:
        count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int,input().split()))

reply = []
for i in range(len(a_list)):
    reply.append(str(a_list.index(i+1)+1))

print(' '.join(reply))

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

reply = [None for i in range(len(a_list))]

for i,a in enumerate(a_list):
    reply[a-1] = str(i+1)

print(' '.join(reply))
Buggy python submission (verdict: Time Limit Exceeded):
n,k,q = map(int,input().split())
a_list = [int(input()) for i in range(q)]

scores = [a_list.count(i+1) for i in range(n)]


for i,score in enumerate(scores):
    if k-q+score > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
n,k,q = map(int,input().split())

scores = {}
for i in range(n):
    scores[i+1] = k-q
for elem in [int(input()) for i in range(q)]:
    scores[elem] += 1

for k,v in scores.items():
    if v > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a_list = list(map(int,input().split()))

def sub_sort(list,num):
    for i,elem in enumerate(list):
        if num >= elem:
            list.insert(i,num)
            return list
        elif i == len(list) - 1:
            list.append(num)
            return list

if n == 1:
    for i in range(m):
        a_list[0] = a_list[0] // 2
    print(a_list[0])
else:
    a_list.sort(reverse=True)
    for i in range(m):
        a_list = sub_sort(a_list[1:],a_list[0]//2)
    print(sum(a_list))

Fixed submission:
import heapq

# O(MlogN)
n,m = map(int,input().split())
a_list = list(map(lambda x: int(x)*(-1),input().split()))
heapq.heapify(a_list)

for _ in range(m):
    tmp_min = heapq.heappop(a_list)
    heapq.heappush(a_list, (-1)*(-tmp_min//2)) 

print(-sum(a_list))

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a_list = list(map(int,input().split()))

def maximum(list):
    sub = []
    for i,x in enumerate(list):
        if sub == [] or x > sub[0]:
            sub = [x,i]
    return sub[0],sub[1]

for i in range(m):
    x,idx = maximum(a_list)
    a_list[idx] = x//2

print(sum(a_list))

Fixed submission:
import heapq

# O(MlogN)
n,m = map(int,input().split())
a_list = list(map(lambda x: int(x)*(-1),input().split()))
heapq.heapify(a_list)

for _ in range(m):
    tmp_min = heapq.heappop(a_list)
    heapq.heappush(a_list, (-1)*(-tmp_min//2)) 

print(-sum(a_list))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

count = 0
for i in range(n-1):
    count += i+1

print(count)

Fixed submission:
n = int(input())

print(int((n-1)*n//2))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
print(sum([i+1 for i in range(n-1)]))

Fixed submission:
n = int(input())

print(int((n-1)*n//2))
Buggy python submission (verdict: Runtime Error):
import heapq

n,m = map(int,input().split())
a_list = list(map(int,input().split()))
move = [list(map(int,input().split())) for _ in range(m)]

heapq.heapify(a_list)
a_list = sorted(a_list, key=lambda x: x[1],reverse=True)

for elem in move:
    for i in range(elem[0]):
        _min = heapq.heappop(a_list)
        if _min < elem[1]:
            heapq.heappush(a_list,elem[1])
        else:
            heapq.heappush(a_list,_min)
            break

print(sum(a_list))

Fixed submission:
import heapq

n,m = map(int,input().split())
a_list = list(map(int,input().split()))
move = [list(map(int,input().split())) for _ in range(m)]

heapq.heapify(a_list)
move = sorted(move, key=lambda x: x[1],reverse=True)

for elem in move:
    for i in range(elem[0]):
        _min = heapq.heappop(a_list)
        if _min < elem[1]:
            heapq.heappush(a_list,elem[1])
        else:
            heapq.heappush(a_list,_min)
            break

print(sum(a_list))

Buggy python submission (verdict: Time Limit Exceeded):
import heapq

n,m = map(int,input().split())
a_list = list(map(int,input().split()))
move = [list(map(int,input().split())) for _ in range(m)]

heapq.heapify(a_list)

for elem in move:
    for i in range(elem[0]):
        _min = heapq.heappop(a_list)
        if _min < elem[1]:
            heapq.heappush(a_list,elem[1])
        else:
            heapq.heappush(a_list,_min)
            break

print(sum(a_list))

Fixed submission:
import heapq

n,m = map(int,input().split())
a_list = list(map(int,input().split()))
move = [list(map(int,input().split())) for _ in range(m)]

heapq.heapify(a_list)
move = sorted(move, key=lambda x: x[1],reverse=True)

for elem in move:
    for i in range(elem[0]):
        _min = heapq.heappop(a_list)
        if _min < elem[1]:
            heapq.heappush(a_list,elem[1])
        else:
            heapq.heappush(a_list,_min)
            break

print(sum(a_list))
Buggy python submission (verdict: Runtime Error):
num_list = [int(input()) for i in range(5)]

remains = []
divs = []

for num in num_list:
    remains.append(num % 10)
    divs.append(num // 10)

zeros = remains.count(0)

for i in range(remains.count(0)):
    remains.remove(0)

print(sum(divs) * 10 + 40 - zeros * 10 + min(remains))

Fixed submission:
num_list = [int(input()) for i in range(5)]

remains = []
divs = []

for num in num_list:
    remains.append(num % 10)
    divs.append(num // 10)

zeros = remains.count(0)

for i in range(remains.count(0)):
    remains.remove(0)

if len(remains) == 0:
    print(sum(divs) * 10)
else:
    print(sum(divs) * 10 + 40 - zeros * 10 + min(remains))
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, K = map(int, input().split())

sum_max = 0

for i in range(K):
    if A:
        sum_max += 1
        A -= 1
    elif B:
        B -= 1
    else:
        sum_max -= 1
        C -= 1

print(sum_max)

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

sum=0

if A>K:
    sum += K
    K = 0
else:
    sum += A
    K = K-A

if B>K:
    K = 0
else:
    K = K-B

if C>K:
    sum -= K
    K = 0
else:
    sum -= C
    K = K-C

print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li():
	return list(map(int , input().split()))


def num():
	return map(int , input().split())


def nu():
	return int(input())


def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x


s=input()
k=nu()
n=len(s)
z=set()
for i in range(n):
	pp=""
	for j in range(i,n):
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])

Fixed submission:
import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li():
	return list(map(int , input().split()))


def num():
	return map(int , input().split())


def nu():
	return int(input())


def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x


s=input()
k=nu()
n=len(s)
m=k
z=set()
for i in range(n):
	pp=""
	for j in range(i,i+m):
		if(j>=n):
			break
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li():
	return list(map(int , input().split()))


def num():
	return map(int , input().split())


def nu():
	return int(input())


def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x


s=input()
k=nu()
n=len(s)
z=set()
for i in range(n):
	pp=""
	for j in range(i,n):
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])

Fixed submission:
import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li():
	return list(map(int , input().split()))


def num():
	return map(int , input().split())


def nu():
	return int(input())


def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x


s=input()
k=nu()
n=len(s)
m=k
z=set()
for i in range(n):
	pp=""
	for j in range(i,i+m):
		if(j>=n):
			break
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=nu()
n=len(s)
z=set()
for i in range(n):
	pp=""
	for j in range(i,n):
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])

Fixed submission:
import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li():
	return list(map(int , input().split()))


def num():
	return map(int , input().split())


def nu():
	return int(input())


def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x


s=input()
k=nu()
n=len(s)
m=k
z=set()
for i in range(n):
	pp=""
	for j in range(i,i+m):
		if(j>=n):
			break
		pp+=s[j]
		z.add(pp)
fin=list(z)
fin.sort()
print(fin[k-1])
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *

# S = input()
# N = int(input())
# K, N = [int(x) for x in input().split()]

N = int(input())

S = []
score = [(0,0)] * N

for n in range(N):
    S.append(input())
    while "()" in S[n]:
        S[n] = S[n].replace("()", "")

    if len(S[n]) >= 1:
        beg = S[n].count("(")
        end = S[n].count(")")

        if S[n][0] == "(":
            score[n] = (0, beg)
        else:
            score[n] = (-end, beg)
    else:
        score[n] = (0, 0)

score.sort(reverse=True)

cr = 0
for n in range(N):
    if score[n][0] == 0:
        cr += score[n][1]

for n in range(N):
    if score[n][0] > 0:
        if cr - score[n][0] < 0:
            print("No")
            exit(0)
        cr += sum(score[n])

for n in range(N):
    if score[n][0] < 0:
        cr += sum(score[n])
        if cr < 0:
            print("No")
            exit(0)

if cr == 0:
    print("Yes")
else:
    print("No")


Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *

# S = input()
# N = int(input())
# K, N = [int(x) for x in input().split()]

S = input()

T = input()

if T[0:len(S)] == S and len(S) + 1 == len(T):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

N, M = [int(x) for x in input().split()]

H = np.array([int(x) for x in input().split()])

Road = []
for m in range(M):
    Road.append([int(x) for x in input().split()])

Road = np.array(Road)

good = 0

for n in range(N):
    l1 = (np.ravel(Road[Road[:, 0] == n+1])-1).tolist()
    l1.extend((np.ravel(Road[Road[:, 1] == n+1])-1).tolist())
    l1 = list(set(l1))
    if len(H[l1]) == 0:
        good += 1
        continue;

    l1.remove(n)
    if max(H[l1]) < H[n]:
        good += 1

print(good)


Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

N, M = [int(x) for x in input().split()]

H = np.array([int(x) for x in input().split()])

good = [1] * N

road = []
for m in range(M):
    a, b = [int(x) for x in input().split()]

    if H[a-1] == H[b-1]:
        good[a-1] = 0
        good[b-1] = 0
    elif H[a-1] < H[b-1]:
        good[a-1] = 0
    else:
        good[b-1] = 0

print(sum(good))
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *
from collections import Counter

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

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

number = range(1, N+1)
numhei = [0] * N
for n in range(N):
    numhei[n] = number[n] + A[n]

count = 0
for n in number:
    count += Counter(numhei)[n - A[n-1]]

print(count)


Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *
from collections import Counter

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

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

number = range(1, N+1)
numhei = [0] * N
for n in range(N):
    numhei[n] = number[n] + A[n]

c = Counter(numhei)
count = 0
for n in number:
    count += c[n - A[n-1]]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

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

number = range(1, N+1)
numhei = [0] * N
for n in range(N):
    numhei[n] = number[n] + A[n]

numhei = np.array(numhei)

count = 0
for n in number:
    count += sum(n - A[n-1] == numhei[0:n-1])

print(count)


Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *
from collections import Counter

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

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

number = range(1, N+1)
numhei = [0] * N
for n in range(N):
    numhei[n] = number[n] + A[n]

c = Counter(numhei)
count = 0
for n in number:
    count += c[n - A[n-1]]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

from itertools import *

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

number = list(combinations(range(1, N+1), 2))
height = list(combinations(A, 2))

count = 0

for n, h in zip(number, height):
    if n[1]-n[0] == sum(h):
        count += 1

print(count)

Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *
from collections import Counter

# S = input().split()
# N = int(input().split())
# N, K = [int(x) for x in input().split()]

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

number = range(1, N+1)
numhei = [0] * N
for n in range(N):
    numhei[n] = number[n] + A[n]

c = Counter(numhei)
count = 0
for n in number:
    count += c[n - A[n-1]]

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
# N = int(input().split())
# K, N = [int(x) for x in input().split()]

N, M = [int(x) for x in input().split()]
city = []
for n in range(M):
    P, Y = [int(x) for x in input().split()]
    city.append([Y, P, n, 1])

city = np.array(city)
city2 = []

for n in range(N):
    s = np.sort(city[city[:, 1] == n+1][:, 0])
    for ss, nn in zip(s, range(1, len(s)+1)):
        l = list(city[city[:, 0] == ss][0, 0:3])
        l.append(nn)
        city2.append(l)
city2 = np.array(city2)

city2 = city2[np.argsort(city2[:, 2])]

for c in city2:
    print(str(c[1]).zfill(6) + str(c[3]).zfill(6))



Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
# N = int(input().split())
# K, N = [int(x) for x in input().split()]

N, M = [int(x) for x in input().split()]
city = []

for n in range(M):
    P, Y = [int(x) for x in input().split()]
    city.append([n, P, Y])
city = np.array(city)
city = city[np.argsort(city[:, 2])]
counts = np.array([1]*N)

city2 = []

for n in range(M):
    city2.append([city[n, 0], city[n, 1], city[n, 2], counts[city[n, 1]-1]])
    counts[city[n, 1]-1] += 1

city2 = np.array(city2)
city2 = city2[np.argsort(city2[:, 0])]
for c in city2:
    print(str(c[1]).zfill(6) + str(c[3]).zfill(6))
Buggy python submission (verdict: Time Limit Exceeded):
import sys;input=lambda:sys.stdin.readline().rstrip();aint=lambda:int(input());ints=lambda:list(map(int,input().split()))
import math;floor,ceil=lambda x:int(math.floor(x)),lambda x:int(math.ceil(x))
from functools import reduce;gcd=lambda*x:reduce(math.gcd,x);lcm=lambda*x:reduce(lambda x,y:(x*y)//gcd(x,y),x,1)
from collections import deque
import bisect
Yes=lambda b:print("Yes"if b else"No");YES=lambda b:print("YES"if b else"NO")
is_even=lambda x:True if x%2==0 else False

def main():
    n,k=ints()
    a=ints()
    passed=[]
    flg=0
    p=0
    while flg==0:
        if p in passed:
            flg=1
            s=passed.index(p)
            break
        else:
            passed.append(p)
            p=a[p]-1
    l=len(passed)
    if k<l:
        print(passed[k]+1)
    else:
        print(passed[(k-s)%(l-s)+s]+1)

if __name__ == '__main__':
    main()

Fixed submission:
import sys;input=lambda:sys.stdin.readline().rstrip();aint=lambda:int(input());ints=lambda:list(map(int,input().split()))
import math;floor,ceil=lambda x:int(math.floor(x)),lambda x:int(math.ceil(x))
from functools import reduce;gcd=lambda*x:reduce(math.gcd,x);lcm=lambda*x:reduce(lambda x,y:(x*y)//gcd(x,y),x,1)
from collections import deque
import bisect
Yes=lambda b:print("Yes"if b else"No");YES=lambda b:print("YES"if b else"NO")
is_even=lambda x:True if x%2==0 else False

def main():
    n,k=ints()
    a=ints()
    passed=[]
    flg=0
    p=0
    while flg==0:
        if a[p] == 'passed':
            flg=1
            s=passed.index(p)
            break
        else:
            passed.append(p)
            pp=p
            p=a[pp]-1
            a[pp]='passed'
    l=len(passed)
    if k<l:
        print(passed[k]+1)
    else:
        print(passed[(k-s)%(l-s)+s]+1)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
import math; floor,ceil = math.floor,math.ceil
import sys; input = lambda: sys.stdin.readline().rstrip()
aint = lambda: int(input()); ints = lambda: list(map(int, input().split()))
Yes = lambda boolean: print('Yes') if boolean else print('No')
YES = lambda boolean: print('YES') if boolean else print('NO')
is_even = lambda x: True if x%2==0 else False

def main():
    n = aint()
    a = ints()
    for i in range(n):
        print(a.count(i+1))

if __name__ == '__main__':
    main()

Fixed submission:
from collections import deque
import math; floor,ceil = math.floor,math.ceil
import sys; input = lambda: sys.stdin.readline().rstrip()
aint = lambda: int(input()); ints = lambda: list(map(int, input().split()))
Yes = lambda boolean: print('Yes') if boolean else print('No')
YES = lambda boolean: print('YES') if boolean else print('NO')
is_even = lambda x: True if x%2==0 else False

def main():
    n = aint()
    a = ints();d = deque(a)
    buka = [0]*n
    for _ in range(n-1):
        buka[d.popleft()-1]+=1
    for num in buka:
        print(num)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n=int(input())
k=int(input())
i=0
while i < n && 2**i<=k:
    i+=1
print(2**i+k*(n-i))


Fixed submission:
n=int(input())
k=int(input())
i=0
while i < n and 2**i<=k:
    i+=1
print(2**i+k*(n-i))
Buggy python submission (verdict: Runtime Error):
I,U = input().split()
print("Yes" if I==U else No)

Fixed submission:
I,U = input().split()
print("Yes" if I==U else "No")
Buggy python submission (verdict: Runtime Error):
O, K = input().split()
i = O*int(k)
u = K*int(O)
print(sorted([i,u])[0])

Fixed submission:
N, M = input().split()
a = N*int(M)
b = M*int(N)
print(sorted([a,b])[0])

Buggy python submission (verdict: Runtime Error):
O,K = input().split()
I = O*int(k)
U = K*int(O)
print(sorted([I,U])[0])

Fixed submission:
N, M = input().split()
a = N*int(M)
b = M*int(N)
print(sorted([a,b])[0])
Buggy python submission (verdict: Runtime Error):
str = input()

if str == "ABC":
    print(ARC)
else:
    print(ABC)


Fixed submission:
str = input()

if str == "ABC":
    print("ARC")
else:
    print("ABC")
Buggy python submission (verdict: Runtime Error):
#print("Enter Number")
a = int(input())
b = int(input())

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


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

i = s[0] * s[1]
if i % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy python submission (verdict: Runtime Error):
print("Enter Number")
a = int(input())
b = int(input())

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


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

i = s[0] * s[1]
if i % 2 == 0:
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
cou = 0
i = 0
flag = 0
if  k == 1:
  n = 0
elif k == 0:
  n = n
else:
  while flag < 1:
    if n < abs(n-k):
      flag = 1
    else:
      n = abs(n-k)
      i += 1

print(n)

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

q = n // k
mod = n % k
ans_mod = k-mod

if mod<ans_mod:
  print(mod)
else:
  print(ans_mod)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
cou = 0
i = 0
flag = 0
if k != 1:
  while flag < 1:
    if n < abs(n-k):
      flag = 1
    else:
      n = abs(n-k)
      i += 1
elif k == 1:
  n = 0
print(n)

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

q = n // k
mod = n % k
ans_mod = k-mod

if mod<ans_mod:
  print(mod)
else:
  print(ans_mod)