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,31 @@
# HumanEval/128
# Loki Mode Multi-Agent Solution
# Attempts: 1
# Passed: True
def prod_signs(arr):
"""
You are given an array arr of integers and you need to return
sum of magnitudes of integers multiplied by product of all signs
of each number in the array, represented by 1, -1 or 0.
Note: return None for empty arr.
Example:
>>> prod_signs([1, 2, 2, -4]) == -9
>>> prod_signs([0, 1]) == 0
>>> prod_signs([]) == None
"""
if not arr:
return None
sign_product = 1
magnitude_sum = 0
for num in arr:
if num == 0:
sign_product = 0
elif num < 0:
sign_product *= -1
magnitude_sum += abs(num)
return sign_product * magnitude_sum