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 listApr 23, 2024 00:02Joad 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
1Apr 23, 2024 00:0200000Error: expected "50715677318188 ", got "50717143226381"
2Apr 23, 2024 00:0200000Error: expected "51183076929723 ", got "51183864015580"
3Apr 23, 2024 00:0200000Error: expected "51080417381450 ", got "51080836565931"
4Apr 23, 2024 00:0256,280110,147,13749,526,72102,252,800
5Apr 23, 2024 00:0256,332103,837,00949,572,30602,269,184
6Apr 23, 2024 00:0256,518108,286,40949,735,80602,269,184
7Apr 23, 2024 00:0256,538109,661,35149,753,42902,260,992
8Apr 23, 2024 00:0256,607112,992,69049,814,37902,252,800
9Apr 23, 2024 00:0257,123107,496,00250,268,17902,260,992