Date: 18 July, 2023
Model: gpt-3.5-turbo
Temperature: 0.2
Passing runs: 10
Total runs: 10
Success rate: 100%
Tokens: 96
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
The above is an incomplete Python code fragment. Return the complete and correct code with no additional text.
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""while b:
a, b = b, a % b
return a
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate(3, 7) == 1
assert candidate(10, 15) == 5
assert candidate(49, 14) == 7
assert candidate(144, 60) == 12
Start time: 2023-07-18 17:28:07
Duration: 3.3s
Completion tokens: 82
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b:
a, b = b, a % b
return a
Start time: 2023-07-18 17:28:03
Duration: 3.39s
Completion tokens: 82
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:59
Duration: 3.77s
Completion tokens: 82
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:56
Duration: 3.31s
Completion tokens: 85
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b != 0:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:52
Duration: 3.91s
Completion tokens: 85
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b != 0:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:48
Duration: 3.34s
Completion tokens: 82
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:44
Duration: 4.63s
Completion tokens: 85
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b != 0:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:40
Duration: 3.36s
Completion tokens: 85
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b != 0:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:36
Duration: 4.07s
Completion tokens: 82
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b:
a, b = b, a % b
return a
Start time: 2023-07-18 17:27:33
Duration: 3.35s
Completion tokens: 82
Result: Pass
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
while b:
a, b = b, a % b
return a