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 listJan 4, 2026 04:42Josu San MartinJosu San MartinError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 08:29Tomislav Tunkovic19.43CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 08:310178,131,063153,899,00013,086,0002,138,112line 15: expected -1558686536304 got 217
2Sep 9, 2026 08:310138,843,433113,351,00012,822,00045,056Exit with code 2: panic: runtime error: integer divide by zero goroutine 1 [running]: main.main() /src/main.go:268 +0xa71stderr
3Jan 4, 2026 03:494,864169,259,324139,051,0002,000,0002,351,104
4Jan 3, 2026 05:004,865164,296,789139,080,0002,001,0002,338,816
5Jan 3, 2026 05:004,866163,715,268139,118,0002,001,0002,338,816
6Jan 4, 2026 03:494,866166,270,284139,108,0002,001,0002,347,008
7Jan 4, 2026 04:194,866164,307,692140,100,0001,000,0002,334,720
8Jan 4, 2026 04:194,866167,476,454139,108,0002,001,0002,334,720
9Jan 4, 2026 04:424,866168,149,508139,101,0002,001,0002,338,816
10Jan 4, 2026 04:194,867172,603,166139,150,0002,002,0002,461,696
11Jan 4, 2026 03:494,869168,732,595140,190,0001,001,0002,347,008
12Jan 4, 2026 04:424,872165,772,818139,278,0002,004,0002,347,008
13Jan 4, 2026 04:424,873168,008,022141,329,00002,347,008
14Jan 3, 2026 05:004,887164,454,793139,726,0001,996,0002,428,928