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 listApr 30, 2026 03:46olliecrowolliecrowError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 30, 2026 03:47026,120,3769,333,0001,037,0002,330,624expected "51555292164905 ", got "51555292164778 "
2Apr 30, 2026 03:4711,69325,298,0209,261,0001,029,0002,367,488
3Apr 30, 2026 03:4711,73626,040,9999,296,0001,032,0002,371,584
4Apr 30, 2026 03:4711,76229,558,0179,316,0001,035,0002,371,584
5Apr 30, 2026 03:4711,79629,061,4709,343,0001,038,0002,371,584
6Apr 30, 2026 03:4711,82229,947,4349,364,0001,040,0002,379,776
7Apr 30, 2026 03:4711,90632,144,6849,431,0001,047,0002,371,584
8Apr 30, 2026 03:4711,91329,338,0039,436,0001,048,0002,363,392
9Apr 30, 2026 03:4711,95726,343,9189,471,0001,052,0002,375,680