Task: Round Floats to Integers While Preserving Their Sum
Task: Round Floats to Integers While Preserving Their Sum: a task in Terminal-Lego-15k (Harbor dataset). Implement a program that rounds an array of floating-point numbers to integers while preserving their sum. This is a common problem in scenarios like proportional allocation, vote distribution…
The task
Implement a program that rounds an array of floating-point numbers to integers while preserving their sum. This is a common problem in scenarios like proportional allocation, vote distribution, or apportionment.
Part of PrimeIntellect/Terminal-Lego-15k.