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 5, 2024 22:22Joad 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 5, 2024 22:2200000Error: expected "51052589874662 ", got "+DIFF: 1011319501 -DIFF: 1217 -DIFF: 5081 51053601187865 "stderr
2Dec 5, 2024 22:2800000Error: expected "51204722988040 ", got "-DIFF: 2713 51204722985327 "stderr
3Dec 5, 2024 22:3200000Error: expected "50731238895576 ", got "-DIFF: 5689 50731238889887 "stderr