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 listDec 6, 2024 17:58Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 6, 2024 17:5700000Error: expected "51557535223653 ", got "51558901832030 "stderr
2Dec 6, 2024 17:5800000Error: expected "51624998406029 ", got "51626883823621 "stderr
3Dec 6, 2024 17:5822,61942,738,40418,910,000995,0002,277,376
4Dec 6, 2024 17:5822,65842,762,59119,939,00002,539,520
5Dec 6, 2024 17:5822,67838,813,99118,960,000997,0002,371,584
6Dec 6, 2024 17:5822,69345,466,01218,972,000998,0002,269,184
7Dec 6, 2024 17:5822,76140,704,38417,026,0003,004,0002,531,328
8Dec 6, 2024 17:5822,89343,215,74019,139,0001,007,0002,269,184