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 listNov 18, 2025 12:26izotoffizotoffError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 8, 2026 15:01C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 8, 2026 15:01014,086,5411,342,000049,152Exit with code 2: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xcd8 pc=0x499c33] goroutine 1 [running]: main.(*Stack).Peek(...) /src/main.go:40 main.main() /src/main.g...stderr
2Nov 18, 2025 12:266,894227,790,196196,923,0002,998,0002,338,816
3Nov 18, 2025 12:266,902223,802,458198,149,0002,001,0002,330,624
4Nov 18, 2025 12:266,908225,379,177200,346,00002,326,528