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 listJun 28, 2026 02:21Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 22:07Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 22:08014,372,0952,203,0001,522,000106,496Exit with code 2: runtime: g 1: unexpected return pc for runtime.sigpanic called from 0x10000734 stack: frame={sp:0x3149f49a2640, fp:0x3149f49a26a0} stack=[0x3149f49a2000,0x3149f49a2800) 7 6 5 4 3 2 1 0 f e d c b a 9 8 012345678...stderr
2Jun 28, 2026 02:233,116100,692,80489,166,0001,215,0002,138,112
3Jun 28, 2026 02:233,117100,437,22989,394,0001,008,0002,138,112
4Jun 28, 2026 02:233,11998,989,76589,215,0001,262,0002,138,112
5Jun 28, 2026 02:233,11998,291,01989,199,0001,278,0002,138,112
6Jun 28, 2026 02:233,119101,596,16889,464,0001,009,0002,138,112
7Jun 28, 2026 02:233,120100,780,97989,500,0001,008,0002,138,112
8Jun 28, 2026 02:233,120100,293,64489,482,0001,009,0002,138,112
9Jun 28, 2026 02:233,12098,286,91889,244,0001,251,0002,138,112
10Jun 28, 2026 02:233,126101,186,79989,636,0001,020,0002,138,112