Fix: Ensure all skills are tracked as files, not submodules

This commit is contained in:
sck_0
2026-01-14 18:48:48 +01:00
parent 7f46ed8ca1
commit 8bd204708b
1113 changed files with 82065 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
# HumanEval/99
# Loki Mode Multi-Agent Solution
# Attempts: 1
# Passed: True
def closest_integer(value):
'''
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
Examples
>>> closest_integer("10")
10
>>> closest_integer("15.3")
15
Note:
Rounding away from zero means that if the given number is equidistant
from two integers, the one you should return is the one that is the
farthest from zero. For example closest_integer("14.5") should
return 15 and closest_integer("-14.5") should return -15.
'''
from math import floor, ceil
num = float(value)
# Check if the number is equidistant from two integers (ends in .5)
if abs(num - round(num)) == 0.5 or (num != int(num) and abs(num % 1) == 0.5):
# Round away from zero
if num > 0:
return ceil(num)
else:
return floor(num)
else:
return round(num)