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 listAug 31, 2026 08:37Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 17:48Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 17:50027,664,20715,886,0001,040,00045,056Exit with code 2: SIGFPE: floating-point exception PC=0x10001615 m=0 sigcode=1 instruction bytes: 0x49 0xf7 0xfe 0x49 0x89 0xc2 0xeb 0x27 0x31 0xd2 0x41 0xf7 0xf2 0x41 0x89 0xc2 goroutine 1 gp=0x27c854a121e0 m=0 mp=0x527c20 [syscall]: syscall.Syscall(...stderr
2Aug 31, 2026 08:381,92464,225,12954,800,0001,017,0002,142,208stderr
3Aug 31, 2026 08:381,92664,260,11654,848,0001,007,0002,142,208stderr
4Aug 31, 2026 08:381,92764,265,93954,869,0001,016,0002,142,208stderr
5Aug 31, 2026 08:381,92764,287,61954,872,0001,018,0002,142,208stderr
6Aug 31, 2026 08:381,92764,340,95754,883,0001,015,0002,142,208stderr
7Aug 31, 2026 08:381,92965,153,59954,914,0001,049,0002,142,208stderr
8Aug 31, 2026 08:381,93064,463,13654,925,0001,072,0002,142,208stderr
9Aug 31, 2026 08:381,93364,451,34554,956,0001,121,0002,142,208stderr
10Aug 31, 2026 08:381,93473,491,47354,977,0001,116,0002,142,208stderr