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 listMar 3, 2025 01:14wainCGPwainCGPScore: 25,483Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 3, 2025 01:1425,34544,508,90321,291,0001,013,0002,289,664
2Mar 3, 2025 01:1425,37645,249,38322,331,00002,289,664
3Mar 3, 2025 01:1425,38549,739,99420,309,0002,030,0002,289,664
4Mar 3, 2025 01:1425,45853,350,12221,385,0001,018,0002,289,664
5Mar 3, 2025 01:1425,48349,996,85321,406,0001,019,0002,269,184
6Mar 3, 2025 01:1425,49044,765,20322,431,00002,392,064
7Mar 3, 2025 01:1425,50050,592,86021,420,0001,020,0002,273,280
8Mar 3, 2025 01:1425,50145,107,03921,421,0001,020,0002,277,376
9Mar 3, 2025 01:1425,75045,537,69321,630,0001,030,0002,265,088