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 29, 2026 01:49Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 02:09Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 03:48027,803,61116,176,0001,079,00053,248Exit with code 2: runtime: g 1: unexpected return pc for runtime.sigpanic called from 0x100002d0 stack: frame={sp:0x2b96708e2640, fp:0x2b96708e26a0} stack=[0x2b96708e2000,0x2b96708e2800) 7 6 5 4 3 2 1 0 f e d c b a 9 8 012345678...stderr
2Jun 29, 2026 01:503,03595,844,62386,882,0001,148,0002,138,112
3Jun 29, 2026 01:503,03698,604,24386,854,0001,191,0002,138,112
4Jun 29, 2026 01:503,03697,331,10886,870,0001,183,0002,138,112
5Jun 29, 2026 01:503,03798,798,37486,890,0001,210,0002,138,112
6Jun 29, 2026 01:503,03798,887,53286,901,0001,179,0002,138,112
7Jun 29, 2026 01:503,03797,513,10686,885,0001,198,0002,138,112
8Jun 29, 2026 01:503,03898,516,92587,117,0001,008,0002,138,112
9Jun 29, 2026 01:503,03898,505,79086,908,0001,206,0002,138,112
10Jun 29, 2026 01:503,04498,714,05887,261,0001,016,0002,138,112