Banja Lab / Benchmarks / Test
The same task, run on 28 models. Compare the outputs side by side, or open any one in a popup to inspect it.
Top result: claude-opus-4-8 (high reasoning) at 100.0% composite. Lowest: claude-opus-4-8 at 0.0%. 28 models compared on this task.
Implement two Python functions that convert between integers and Roman numerals, using canonical (subtractive) notation. - `int_to_roman(n)`: convert an integer in the range 1..3999 inclusive to its canonical Roman numeral string. Use subtractive forms: 4 is "IV", 9 is "IX", 40 is "XL", 90 is "XC", 400 is "CD", 900 is "CM". Raise `ValueError` for any integer outside 1..3999. - `roman_to_int(s)`: convert a canonical Roman numeral string back to its integer value. Raise `ValueError` for an empty string or a malformed or non-canonical numeral (for example "IIII", "VX", or "ABC"). The two functions are inverses on 1..3999: `roman_to_int(int_to_roman(n)) == n`. Use only the Python standard library. Write your solution to `solution.py`.