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 23:50Joad 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 23:4900000Error: expected "50885817615927 ", got "50887100184668 "stderr
2Nov 27, 2024 23:5000000Error: expected "51219554114823 ", got "51219556861300 "stderr
3Nov 27, 2024 23:5087,888101,624,74277,341,00002,416,640
4Nov 27, 2024 23:5088,164103,779,39376,577,0001,007,0002,535,424
5Nov 27, 2024 23:5088,166104,375,99776,579,0001,007,0002,273,280