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 18, 2026 03:50M-RochatM-RochatError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 18, 2026 03:50012,701,884953,00002,121,728expected "51056090393294 ", got "fd0 flags=32768 target=/mnt/hldata/data894026893 pread=63:3.j*..h.>..&.d.ZR.zRx..2*..j.k.8...28r.C#-6'M..`.Z.".......%{.1 fd1 flags=32770 target=/mnt/hldata/got3441351682 pread=0: fd2 flags=1 target=pipe:[10798182] pr...
2May 18, 2026 03:5009,780,618939,00002,121,728expected "51308771638374 ", got "fd0 flags=32768 target=/mnt/hldata/data3849439854 pread=63:\e.=.&x[...j[.oqr{........hR......mhU...7..:.V.{.K.d.*..!W.lx.. fd1 flags=32770 target=/mnt/hldata/got1552609379 pread=0: fd2 flags=1 target=pipe:[10798352] p...
3May 18, 2026 03:5009,999,077951,00002,121,728expected "50852493416307 ", got "fd0 flags=32768 target=/mnt/hldata/data4234307937 pread=63:.FMY..._...........5$..Q..*....[..E|...*...Z,`...0.....SuZ.#t.1 fd1 flags=32770 target=/mnt/hldata/got2586307551 pread=0: fd2 flags=1 target=pipe:[10798458] p...