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 listMay 19, 2026 09:46Josu San MartinJosu San MartinError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 19, 2026 09:49019,032,2108,291,0001,007,0002,113,536expected "50855136438974 ", got "50855136438901 "
2May 19, 2026 09:4910,56318,908,6708,275,0001,021,0002,117,632
3May 19, 2026 09:4910,57018,774,3968,285,0001,017,0002,117,632
4May 19, 2026 09:4910,58918,452,9608,286,0001,033,0002,117,632
5May 19, 2026 09:4910,59718,473,9038,299,0001,027,0002,117,632
6May 19, 2026 09:4910,60218,370,8808,305,0001,025,0002,117,632
7May 19, 2026 09:4910,64320,396,6918,340,0001,026,0002,117,632
8May 19, 2026 09:4910,66819,878,5338,302,0001,086,0002,117,632
9May 19, 2026 09:4910,79018,750,3508,421,0001,075,0002,117,632