task_id
stringlengths 36
40
| entry_point
stringlengths 1
30
| prompt
stringlengths 116
1.98k
| suffix
stringlengths 0
837
| canonical_solution
stringlengths 6
859
| test
stringlengths 117
1.8k
|
---|---|---|---|---|---|
MultiLineInfilling/HumanEval/32/L6_L10 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
| if poly(xs, center) * poly(xs, begin) > 0:
begin = center
else:
end = center
return begin
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
|
MultiLineInfilling/HumanEval/32/L7_L7 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
| else:
end = center
return begin
| begin = center
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
MultiLineInfilling/HumanEval/32/L7_L8 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
| end = center
return begin
| begin = center
else:
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
MultiLineInfilling/HumanEval/32/L7_L9 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
| return begin
| begin = center
else:
end = center
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
MultiLineInfilling/HumanEval/32/L7_L10 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
| begin = center
else:
end = center
return begin
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
|
MultiLineInfilling/HumanEval/32/L8_L8 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
begin = center
| end = center
return begin
| else:
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
MultiLineInfilling/HumanEval/32/L8_L9 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
begin = center
| return begin
| else:
end = center
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
MultiLineInfilling/HumanEval/32/L8_L10 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
begin = center
| else:
end = center
return begin
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
|
MultiLineInfilling/HumanEval/32/L9_L9 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
begin = center
else:
| return begin
| end = center
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
MultiLineInfilling/HumanEval/32/L9_L10 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
begin = center
else:
| end = center
return begin
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
|
MultiLineInfilling/HumanEval/32/L10_L10 | find_zero | import math
def poly(xs: list, x: float):
"""
Evaluates polynomial with coefficients xs at point x.
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs are coefficients of a polynomial.
find_zero find x such that poly(x) = 0.
find_zero returns only only zero point, even if there are many.
Moreover, find_zero only takes list xs having even number of coefficients
and largest non zero coefficient as it guarantees
a solution.
>>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x
-0.5
>>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3
1.0
"""
begin, end = -1., 1.
while poly(xs, begin) * poly(xs, end) > 0:
begin *= 2.0
end *= 2.0
while end - begin > 1e-10:
center = (begin + end) / 2.0
if poly(xs, center) * poly(xs, begin) > 0:
begin = center
else:
end = center
| return begin
|
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
coeff = 1
coeffs.append(coeff)
solution = candidate(copy.deepcopy(coeffs))
assert math.fabs(poly(coeffs, solution)) < 1e-4
|
|
MultiLineInfilling/HumanEval/33/L0_L0 | sort_third |
def sort_third(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal
to the values of the corresponding indicies of l, but sorted.
>>> sort_third([1, 2, 3])
[1, 2, 3]
>>> sort_third([5, 6, 3, 4, 8, 9, 2])
[2, 6, 3, 4, 8, 9, 5]
"""
| l[::3] = sorted(l[::3])
return l
| l = list(l)
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple(sort_third([1, 2, 3]))
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple(sort_third([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]))
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple(sort_third([5, 8, -12, 4, 23, 2, 3, 11, 12, -10]))
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2])) == tuple([2, 6, 3, 4, 8, 9, 5])
assert tuple(candidate([5, 8, 3, 4, 6, 9, 2])) == tuple([2, 8, 3, 4, 6, 9, 5])
assert tuple(candidate([5, 6, 9, 4, 8, 3, 2])) == tuple([2, 6, 9, 4, 8, 3, 5])
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2, 1])) == tuple([2, 6, 3, 4, 8, 9, 5, 1])
|
MultiLineInfilling/HumanEval/33/L0_L1 | sort_third |
def sort_third(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal
to the values of the corresponding indicies of l, but sorted.
>>> sort_third([1, 2, 3])
[1, 2, 3]
>>> sort_third([5, 6, 3, 4, 8, 9, 2])
[2, 6, 3, 4, 8, 9, 5]
"""
| return l
| l = list(l)
l[::3] = sorted(l[::3])
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple(sort_third([1, 2, 3]))
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple(sort_third([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]))
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple(sort_third([5, 8, -12, 4, 23, 2, 3, 11, 12, -10]))
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2])) == tuple([2, 6, 3, 4, 8, 9, 5])
assert tuple(candidate([5, 8, 3, 4, 6, 9, 2])) == tuple([2, 8, 3, 4, 6, 9, 5])
assert tuple(candidate([5, 6, 9, 4, 8, 3, 2])) == tuple([2, 6, 9, 4, 8, 3, 5])
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2, 1])) == tuple([2, 6, 3, 4, 8, 9, 5, 1])
|
MultiLineInfilling/HumanEval/33/L0_L2 | sort_third |
def sort_third(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal
to the values of the corresponding indicies of l, but sorted.
>>> sort_third([1, 2, 3])
[1, 2, 3]
>>> sort_third([5, 6, 3, 4, 8, 9, 2])
[2, 6, 3, 4, 8, 9, 5]
"""
| l = list(l)
l[::3] = sorted(l[::3])
return l
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple(sort_third([1, 2, 3]))
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple(sort_third([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]))
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple(sort_third([5, 8, -12, 4, 23, 2, 3, 11, 12, -10]))
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2])) == tuple([2, 6, 3, 4, 8, 9, 5])
assert tuple(candidate([5, 8, 3, 4, 6, 9, 2])) == tuple([2, 8, 3, 4, 6, 9, 5])
assert tuple(candidate([5, 6, 9, 4, 8, 3, 2])) == tuple([2, 6, 9, 4, 8, 3, 5])
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2, 1])) == tuple([2, 6, 3, 4, 8, 9, 5, 1])
|
|
MultiLineInfilling/HumanEval/33/L1_L1 | sort_third |
def sort_third(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal
to the values of the corresponding indicies of l, but sorted.
>>> sort_third([1, 2, 3])
[1, 2, 3]
>>> sort_third([5, 6, 3, 4, 8, 9, 2])
[2, 6, 3, 4, 8, 9, 5]
"""
l = list(l)
| return l
| l[::3] = sorted(l[::3])
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple(sort_third([1, 2, 3]))
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple(sort_third([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]))
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple(sort_third([5, 8, -12, 4, 23, 2, 3, 11, 12, -10]))
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2])) == tuple([2, 6, 3, 4, 8, 9, 5])
assert tuple(candidate([5, 8, 3, 4, 6, 9, 2])) == tuple([2, 8, 3, 4, 6, 9, 5])
assert tuple(candidate([5, 6, 9, 4, 8, 3, 2])) == tuple([2, 6, 9, 4, 8, 3, 5])
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2, 1])) == tuple([2, 6, 3, 4, 8, 9, 5, 1])
|
MultiLineInfilling/HumanEval/33/L1_L2 | sort_third |
def sort_third(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal
to the values of the corresponding indicies of l, but sorted.
>>> sort_third([1, 2, 3])
[1, 2, 3]
>>> sort_third([5, 6, 3, 4, 8, 9, 2])
[2, 6, 3, 4, 8, 9, 5]
"""
l = list(l)
| l[::3] = sorted(l[::3])
return l
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple(sort_third([1, 2, 3]))
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple(sort_third([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]))
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple(sort_third([5, 8, -12, 4, 23, 2, 3, 11, 12, -10]))
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2])) == tuple([2, 6, 3, 4, 8, 9, 5])
assert tuple(candidate([5, 8, 3, 4, 6, 9, 2])) == tuple([2, 8, 3, 4, 6, 9, 5])
assert tuple(candidate([5, 6, 9, 4, 8, 3, 2])) == tuple([2, 6, 9, 4, 8, 3, 5])
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2, 1])) == tuple([2, 6, 3, 4, 8, 9, 5, 1])
|
|
MultiLineInfilling/HumanEval/33/L2_L2 | sort_third |
def sort_third(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal
to the values of the corresponding indicies of l, but sorted.
>>> sort_third([1, 2, 3])
[1, 2, 3]
>>> sort_third([5, 6, 3, 4, 8, 9, 2])
[2, 6, 3, 4, 8, 9, 5]
"""
l = list(l)
l[::3] = sorted(l[::3])
| return l
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple(sort_third([1, 2, 3]))
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple(sort_third([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]))
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple(sort_third([5, 8, -12, 4, 23, 2, 3, 11, 12, -10]))
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2])) == tuple([2, 6, 3, 4, 8, 9, 5])
assert tuple(candidate([5, 8, 3, 4, 6, 9, 2])) == tuple([2, 8, 3, 4, 6, 9, 5])
assert tuple(candidate([5, 6, 9, 4, 8, 3, 2])) == tuple([2, 6, 9, 4, 8, 3, 5])
assert tuple(candidate([5, 6, 3, 4, 8, 9, 2, 1])) == tuple([2, 6, 3, 4, 8, 9, 5, 1])
|
|
MultiLineInfilling/HumanEval/34/L0_L0 | unique |
def unique(l: list):
"""Return sorted unique elements in a list
>>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
[0, 2, 3, 5, 9, 123]
"""
| return sorted(list(set(l)))
|
METADATA = {}
def check(candidate):
assert candidate([5, 3, 5, 2, 3, 3, 9, 0, 123]) == [0, 2, 3, 5, 9, 123]
|
|
MultiLineInfilling/HumanEval/35/L0_L0 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
| for e in l:
if e > m:
m = e
return m
| m = l[0]
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L0_L1 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
| if e > m:
m = e
return m
| m = l[0]
for e in l:
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L0_L2 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
| m = e
return m
| m = l[0]
for e in l:
if e > m:
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L0_L3 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
| return m
| m = l[0]
for e in l:
if e > m:
m = e
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L0_L4 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
| m = l[0]
for e in l:
if e > m:
m = e
return m
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
|
MultiLineInfilling/HumanEval/35/L1_L1 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
| if e > m:
m = e
return m
| for e in l:
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L1_L2 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
| m = e
return m
| for e in l:
if e > m:
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L1_L3 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
| return m
| for e in l:
if e > m:
m = e
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L1_L4 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
| for e in l:
if e > m:
m = e
return m
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
|
MultiLineInfilling/HumanEval/35/L2_L2 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
for e in l:
| m = e
return m
| if e > m:
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L2_L3 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
for e in l:
| return m
| if e > m:
m = e
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L2_L4 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
for e in l:
| if e > m:
m = e
return m
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
|
MultiLineInfilling/HumanEval/35/L3_L3 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
for e in l:
if e > m:
| return m
| m = e
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
MultiLineInfilling/HumanEval/35/L3_L4 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
for e in l:
if e > m:
| m = e
return m
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
|
MultiLineInfilling/HumanEval/35/L4_L4 | max_element |
def max_element(l: list):
"""Return maximum element in the list.
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
m = l[0]
for e in l:
if e > m:
m = e
| return m
|
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
|
MultiLineInfilling/HumanEval/36/L0_L0 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| ns = []
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L1 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| ns = []
for i in range(n):
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L2 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L3 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L4 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| ans = 0
for c in s:
ans += (c == '7')
return ans
| ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L5 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| for c in s:
ans += (c == '7')
return ans
| ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L6 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| ans += (c == '7')
return ans
| ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| return ans
| ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L0_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
| ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L1_L1 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| for i in range(n):
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L1_L2 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L1_L3 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L1_L4 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| ans = 0
for c in s:
ans += (c == '7')
return ans
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L1_L5 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| for c in s:
ans += (c == '7')
return ans
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L1_L6 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| ans += (c == '7')
return ans
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L1_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| return ans
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L1_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
| for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L2_L2 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
| ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| if i % 11 == 0 or i % 13 == 0:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L2_L3 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
| s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L2_L4 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
| ans = 0
for c in s:
ans += (c == '7')
return ans
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L2_L5 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
| for c in s:
ans += (c == '7')
return ans
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L2_L6 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
| ans += (c == '7')
return ans
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L2_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
| return ans
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L2_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
| if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L3_L3 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
| s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
| ns.append(i)
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L3_L4 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
| ans = 0
for c in s:
ans += (c == '7')
return ans
| ns.append(i)
s = ''.join(list(map(str, ns)))
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L3_L5 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
| for c in s:
ans += (c == '7')
return ans
| ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L3_L6 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
| ans += (c == '7')
return ans
| ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L3_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
| return ans
| ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L3_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
| ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L4_L4 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
| ans = 0
for c in s:
ans += (c == '7')
return ans
| s = ''.join(list(map(str, ns)))
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L4_L5 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
| for c in s:
ans += (c == '7')
return ans
| s = ''.join(list(map(str, ns)))
ans = 0
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L4_L6 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
| ans += (c == '7')
return ans
| s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L4_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
| return ans
| s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L4_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
| s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L5_L5 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
| for c in s:
ans += (c == '7')
return ans
| ans = 0
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L5_L6 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
| ans += (c == '7')
return ans
| ans = 0
for c in s:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L5_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
| return ans
| ans = 0
for c in s:
ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L5_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
| ans = 0
for c in s:
ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L6_L6 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
| ans += (c == '7')
return ans
| for c in s:
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L6_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
| return ans
| for c in s:
ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L6_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
| for c in s:
ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L7_L7 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
| return ans
| ans += (c == '7')
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
MultiLineInfilling/HumanEval/36/L7_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
| ans += (c == '7')
return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/36/L8_L8 | fizz_buzz |
def fizz_buzz(n: int):
"""Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
>>> fizz_buzz(50)
0
>>> fizz_buzz(78)
2
>>> fizz_buzz(79)
3
"""
ns = []
for i in range(n):
if i % 11 == 0 or i % 13 == 0:
ns.append(i)
s = ''.join(list(map(str, ns)))
ans = 0
for c in s:
ans += (c == '7')
| return ans
|
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
|
MultiLineInfilling/HumanEval/37/L0_L0 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens = l[::2]
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L1 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens = l[::2]
odds = l[1::2]
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L2 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens = l[::2]
odds = l[1::2]
evens.sort()
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L3 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens = l[::2]
odds = l[1::2]
evens.sort()
ans = []
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L4 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens = l[::2]
odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L5 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens = l[::2]
odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L6 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| ans.append(evens[-1])
return ans
| evens = l[::2]
odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L7 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| return ans
| evens = l[::2]
odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L0_L8 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
| evens = l[::2]
odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
|
MultiLineInfilling/HumanEval/37/L1_L1 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| odds = l[1::2]
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L1_L2 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| odds = l[1::2]
evens.sort()
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L1_L3 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| odds = l[1::2]
evens.sort()
ans = []
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L1_L4 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L1_L5 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L1_L6 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| ans.append(evens[-1])
return ans
| odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L1_L7 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| return ans
| odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L1_L8 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
| odds = l[1::2]
evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
|
MultiLineInfilling/HumanEval/37/L2_L2 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
odds = l[1::2]
| ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens.sort()
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L2_L3 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
odds = l[1::2]
| for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens.sort()
ans = []
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L2_L4 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
odds = l[1::2]
| ans.extend([e, o])
if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens.sort()
ans = []
for e, o in zip(evens, odds):
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L2_L5 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
odds = l[1::2]
| if len(evens) > len(odds):
ans.append(evens[-1])
return ans
| evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|
MultiLineInfilling/HumanEval/37/L2_L6 | sort_even |
def sort_even(l: list):
"""This function takes a list l and returns a list l' such that
l' is identical to l in the odd indicies, while its values at the even indicies are equal
to the values of the even indicies of l, but sorted.
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, 4])
[3, 6, 5, 4]
"""
evens = l[::2]
odds = l[1::2]
| ans.append(evens[-1])
return ans
| evens.sort()
ans = []
for e, o in zip(evens, odds):
ans.extend([e, o])
if len(evens) > len(odds):
|
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 11, 23, -10])
|