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 17:57Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 12:53Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 12:56027,835,98016,257,0001,079,00053,248Exit with code 2: runtime: g 1: unexpected return pc for runtime.sigpanic called from 0x7bfc070df675 stack: frame={sp:0x283c31924dd0, fp:0x283c31924e30} stack=[0x283c31924000,0x283c31925000) 7 6 5 4 3 2 1 0 f e d c b a 9 8 01234...stderr
2May 1, 2026 17:583,351118,037,92396,195,0001,002,0002,461,696
3May 1, 2026 17:583,353109,010,23296,260,0001,002,0002,465,792
4May 1, 2026 17:583,354115,643,13897,293,00002,469,888
5May 1, 2026 17:583,355113,738,46197,302,00002,465,792
6May 1, 2026 17:583,356117,418,85796,327,0001,003,0002,469,888
7May 1, 2026 17:583,356115,994,11496,346,0001,003,0002,461,696
8May 1, 2026 17:583,357119,152,48796,368,0001,003,0002,465,792
9May 1, 2026 17:583,358117,571,28295,382,0002,008,0002,465,792
10May 1, 2026 17:583,361116,698,71295,482,0002,010,0002,461,696