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 listFeb 15, 2024 17:23Bernard TeoBernard TeoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 15, 2024 17:2300000Error: expected "51435765499773 ", got "51435882173254"
2Feb 15, 2024 17:2343,22297,102,82338,035,78202,224,128
3Feb 15, 2024 17:2343,313105,537,79138,115,58802,236,416
4Feb 15, 2024 17:2343,367111,015,43038,162,79402,236,416
5Feb 15, 2024 17:2343,38997,755,62138,182,54702,232,320
6Feb 15, 2024 17:2343,392110,174,80838,184,66402,240,512
7Feb 15, 2024 17:2343,421111,402,69938,210,20602,236,416
8Feb 15, 2024 17:2343,426103,481,06138,215,03102,228,224
9Feb 15, 2024 17:2343,429103,146,03538,217,17602,232,320
10Feb 15, 2024 17:2343,43294,951,69138,220,21402,228,224
11Feb 15, 2024 17:2343,493100,414,02338,274,02802,224,128
12Feb 15, 2024 17:2343,61698,596,19738,382,09002,236,416
13Feb 15, 2024 17:2343,892141,508,58138,624,59902,240,512