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 listNov 27, 2024 21:44Joad 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
1Nov 27, 2024 21:4400000Error: expected "51128766414803 ", got "51128861866164 "stderr
2Nov 27, 2024 21:4400000Error: expected "50963562496780 ", got "50965570143741 "stderr
3Nov 27, 2024 21:44191,377194,548,001167,410,0001,002,0002,273,280
4Nov 27, 2024 21:44191,445193,358,387168,472,00002,437,120
5Nov 27, 2024 21:44192,457193,060,887168,360,0001,002,0002,428,928