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 listMar 4, 2026 14:23DanielDanielError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 8, 2026 11:59C#_user13.67CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 8, 2026 12:050103,784,89291,935,0001,094,0002,117,632line 0: expected 32767 got 2895577246950434858
2Sep 8, 2026 12:050103,153,39492,059,0001,095,0002,117,632line 0: expected 32767 got 2895577246950434858
3Sep 8, 2026 12:050103,501,59392,369,0001,091,0002,117,632line 0: expected 32767 got 2895577246950434858
4Mar 4, 2026 14:236,304206,207,814180,821,0001,998,0002,445,312
5Mar 4, 2026 14:236,312206,410,255181,057,0002,000,0002,342,912
6Mar 4, 2026 14:236,347209,741,989183,051,0001,000,0002,338,816
7Mar 4, 2026 14:236,349205,435,596182,133,0002,001,0002,334,720
8Mar 4, 2026 14:236,356203,862,871183,328,0001,001,0002,293,760
9Mar 4, 2026 14:236,363213,351,619184,525,00002,342,912
10Mar 4, 2026 14:236,365216,270,641183,574,0001,003,0002,330,624
11Mar 4, 2026 14:236,373217,641,338184,809,00002,338,816
12Mar 4, 2026 14:236,451215,926,720187,086,00002,293,760