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

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

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 08:27Haha Expert10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 08:28013,193,8201,356,0001,356,000114,688Exit with code 2: runtime: g 1: unexpected return pc for syscall.init.0 called from 0x72b12332a842 stack: frame={sp:0x272e70b925d8, fp:0x272e70b92620} stack=[0x272e70b92000,0x272e70b92800) 7 6 5 4 3 2 1 0 f e d c b a 9 8 0123456...stderr
2May 1, 2026 18:403,336115,016,76693,762,0002,992,0002,420,736
3May 1, 2026 18:403,336112,367,31293,772,0002,992,0002,412,544
4May 1, 2026 18:403,336112,554,16092,768,0003,990,0002,404,352
5May 1, 2026 18:403,336114,811,18393,765,0002,992,0002,412,544
6May 1, 2026 18:403,337110,542,10494,785,0001,995,0002,416,640
7May 1, 2026 18:403,338115,307,86594,828,0001,996,0002,420,736
8May 1, 2026 18:403,338116,032,75793,827,0002,994,0002,416,640
9May 1, 2026 18:403,341116,774,07093,917,0002,997,0002,408,448
10May 1, 2026 18:403,341112,496,02193,911,0002,997,0002,416,640