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 29, 2024 12:35E SequeiraE SequeiraError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 08:01Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 08:020299,554,860287,463,0002,005,0002,138,112line 22: expected -7111140909022 got -33735468
2Sep 9, 2026 08:020303,230,294291,054,0002,222,0002,134,016line 32: expected -12638986591 got 787133812928
3Sep 9, 2026 08:020304,548,326292,436,0002,096,0002,134,016line 19: expected 5095748312472 got -1175394368595
4Nov 29, 2024 12:3511,601533,495,795308,234,00028,204,00033,705,984
5Nov 29, 2024 12:3511,607537,062,480306,277,00030,324,00033,398,784
6Nov 29, 2024 12:3511,686539,748,997311,324,00027,559,00033,931,264