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,24 @@
# HumanEval/145
# Loki Mode Multi-Agent Solution
# Attempts: 1
# Passed: True
def order_by_points(nums):
"""
Write a function which sorts the given list of integers
in ascending order according to the sum of their digits.
Note: if there are several items with similar sum of their digits,
order them based on their index in original list.
For example:
>>> order_by_points([1, 11, -1, -11, -12]) == [-1, -11, 1, -12, 11]
>>> order_by_points([]) == []
"""
def digit_sum(n):
s = str(n)
if s[0] == '-':
return -int(s[1]) + sum(int(d) for d in s[2:])
else:
return sum(int(d) for d in s)
return sorted(nums, key=digit_sum)