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 02:00Joad 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 01:5900000Error: expected "50766233178478 ", got "50768391176700 "stderr
2Dec 6, 2024 01:5900000Error: expected "51510534920121 ", got "51511114876774 "stderr
3Dec 6, 2024 01:5900000Error: expected "51112774100251 ", got "51114803930660 "stderr
4Dec 6, 2024 02:0000000Error: expected "50816388859498 ", got "50817152893497 "stderr
5Dec 6, 2024 02:0022,62243,286,66219,907,00002,527,232
6Dec 6, 2024 02:0022,77537,653,75519,040,0001,002,0002,539,520
7Dec 6, 2024 02:0022,80551,767,56718,062,0002,006,0002,281,472