Arithmetic expressions Sergey Svistunov

Evaluate 100 arithmetic expressions as fast as possible.

Input

One expression per line on STDIN. Each expression contains 50,000 int16 numbers with operators +, -, *, / (integer division) and parentheses (, ).

-19550 - ((-14208 / (13583 + -19215)) + (-16832 / 797 + (9060 / -23627)) + ((-6060) + 24953))
30835 - 3703 - (-20089 * -6261 + ((-28985 - 29627) + (-17828 - (22773 / -4014) * 1630)))

Output

Print the int64 result of each expression, one per line, to STDOUT.

Back to listMay 1, 2026 18:32Victor MerckléVictor MerckléError
Source Code

Source code access is restricted. Log in to request access.

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 08:28Haha Expert10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 08:28015,682,9101,346,0001,347,00061,440Exit with code 2: runtime: g 1: unexpected return pc for runtime.sigpanic called from 0x79af42f34d8e stack: frame={sp:0x26f79b050590, fp:0x26f79b0505f0} stack=[0x26f79b050000,0x26f79b050800) 7 6 5 4 3 2 1 0 f e d c b a 9 8 01234...stderr
2May 1, 2026 18:333,332116,344,51794,624,0002,013,0002,437,120
3May 1, 2026 18:333,334114,273,93595,691,0001,007,0002,441,216
4May 1, 2026 18:333,336112,926,26994,771,0001,995,0002,420,736
5May 1, 2026 18:333,339116,101,73693,842,0002,994,0002,433,024
6May 1, 2026 18:333,339114,165,67794,844,0001,996,0002,428,928
7May 1, 2026 18:333,342116,766,96595,913,0001,009,0002,428,928
8May 1, 2026 18:333,342117,665,03194,921,0001,998,0002,433,024
9May 1, 2026 18:333,342116,278,00493,924,0002,997,0002,433,024
10May 1, 2026 18:333,342112,367,19594,939,0001,998,0002,433,024