Sum of prime numbers Andrey Tsvetkov

Compute the sum of all prime numbers in a stream of binary integers as fast as possible.

Input: 1 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: The uint64 sum of all values that are prime, printed as a decimal string.

Back to listOct 3, 2026 05:41Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 3, 2026 05:42015,369,3782,507,0002,305,0002,121,728expected "50865931806847 ", got "2147483342000029500 "
2Oct 3, 2026 05:42015,236,5542,389,0002,375,0002,121,728expected "51302084531716 ", got "2147481596000027499 "
3Oct 3, 2026 05:42015,246,4092,353,0002,401,0002,121,728expected "51396302062299 ", got "2147482779000033499 "