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 listJan 18, 2025 11:36matsuoka-601matsuoka-601Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 18, 2025 11:3500000Error: expected "51790500861218 ", got "51790500861151 "stderr
2Jan 18, 2025 11:359,50724,279,8798,366,00002,289,664
3Jan 18, 2025 11:359,51926,479,1087,330,0001,047,0002,531,328
4Jan 18, 2025 11:359,53825,272,7267,344,0001,049,0002,531,328
5Jan 18, 2025 11:369,57422,999,5197,372,0001,053,0002,293,760
6Jan 18, 2025 11:369,57524,459,4827,373,0001,053,0002,383,872
7Jan 18, 2025 11:369,58325,797,7346,325,0002,108,0002,379,776
8Jan 18, 2025 11:369,58524,343,0367,381,0001,054,0002,289,664
9Jan 18, 2025 11:359,59126,890,0356,330,0002,110,0002,285,568
10Jan 18, 2025 11:359,59527,261,9296,333,0002,111,0002,269,184
11Jan 18, 2025 11:359,59823,430,7017,391,0001,055,0002,306,048
12Jan 18, 2025 11:369,61329,854,3447,402,0001,057,0002,293,760
13Jan 18, 2025 11:359,61424,083,5657,403,0001,057,0002,531,328
14Jan 18, 2025 11:369,61827,689,0418,464,00002,289,664
15Jan 18, 2025 11:369,62320,670,1147,410,0001,058,0002,301,952
16Jan 18, 2025 11:359,63330,046,0066,358,0002,119,0002,289,664
17Jan 18, 2025 11:369,66527,621,5247,442,0001,063,0002,285,568
18Jan 18, 2025 11:369,69325,967,2226,398,0002,132,0002,273,280
19Jan 18, 2025 11:359,73825,394,3106,427,0002,142,0002,281,472