Parse integers Sergey Svistunov

Compute the sum of integers read from STDIN as fast as possible.

Input: 50 000 000 lines, each containing one integer in the range [0; 2147483647].

629871117
2024562523
1372689083
1021777120
2111176472

Output: The uint64 sum of all numbers, printed as a decimal string.

Note: Integer overflow is expected – use a 64-bit accumulator.

Back to listJan 13, 2025 04:10Ian MckibbenIan MckibbenError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 13, 2025 04:1000000Error: expected "53685660887602352 ", got "54 54 50 56 56 48 54 50 57 10 50 49 52 53 56 56 SECOND 16 3618132368657888822 4051046363099695673 0 65280 IDX: 9 3618132368657888822 18446744073709551417 6628806519769999 6628806519769999"
2Jan 13, 2025 04:1100000Error: expected "53692906733343427 ", got "55 57 48 49 54 56 55 56 53 10 56 53 54 50 57 56 SECOND 16 4050768195247683895 4051324548198959669 0 65280 IDX: 9 7523096491475364199 14974415777481871205 425189196599989999 425189196599989999"