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 28, 2024 03:52Joad 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 28, 2024 03:5200000Error: expected "51329774289706 ", got "51339280468995 "stderr
2Nov 28, 2024 03:5200000Error: expected "51319986265472 ", got "51332236486656 "stderr
3Nov 28, 2024 03:5200000Error: expected "50509712872614 ", got "50511348555557 "stderr
4Nov 28, 2024 03:5300000Error: expected "50953903978761 ", got "50967789981989 "stderr
5Nov 28, 2024 03:5300000Error: expected "50994976541507 ", got "51006630190294 "stderr