TasksCodingEngineering track

Money arithmetic with allocation

eng-code-05suite v1.0code

Quality25%judge panel
Correctness60%deterministic · hidden-tests
Completeness15%judge panel

Exact prompt sent to every model

Implement money.ts exporting a Money class for exact currency math using integer minor units. Money.of(amount: string | number, currency: string) parses like "19.99" (reject more decimals than the currency allows; USD and EUR have 2, JPY has 0, KWD has 3). Methods: add, subtract (throw on currency mismatch), multiply(factor: number, rounding: "half-even"), allocate(ratios: number[]): Money[] that splits without losing or creating a cent (remainders distributed to earliest parts), format(locale) using Intl, toJSON() returning {amount: string, currency}, and compare. Immutable. No floating point in stored state. No dependencies. Return only the file in one code block.

Responses

Latest published run: gemini-3.8-flash. For each model the repeat closest to its published median is shown; every repeat is in the repository.

No published attempts for this task yet

When the run is published, every model's raw response, per-dimension scores, judge rationales, human review notes and rendered artifacts appear here side by side.

Money arithmetic with allocation (eng-code-05) | XOBENCH