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:4300000Error: expected "51521700754505 ", got "51523087459938 "stderr
2Nov 27, 2024 21:4400000Error: expected "51074381231904 ", got "51075195621548 "stderr
3Nov 27, 2024 21:44189,411198,241,380166,682,00002,273,280
4Nov 27, 2024 21:44189,907190,560,278165,117,0002,001,0002,535,424
5Nov 27, 2024 21:44189,958191,920,201167,163,00002,273,280
6Nov 27, 2024 21:44190,269189,232,326167,437,00002,433,024
7Nov 27, 2024 21:44190,318195,632,592167,480,00002,437,120
8Nov 27, 2024 21:44190,475200,788,996167,618,00002,535,424