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 16:39matsuoka-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 16:4000000Error: expected "51167840828188 ", got "51167840828115 "stderr
2Jan 18, 2025 16:419,08323,549,5274,996,0002,997,0002,531,328
3Jan 18, 2025 16:399,08521,089,1454,997,0002,998,0002,281,472
4Jan 18, 2025 16:419,11629,246,2596,017,0002,005,0002,289,664
5Jan 18, 2025 16:419,11921,416,0157,022,0001,003,0002,285,568
6Jan 18, 2025 16:419,13022,711,6916,026,0002,008,0002,531,328
7Jan 18, 2025 16:419,13821,527,2016,031,0002,010,0002,285,568
8Jan 18, 2025 16:399,14125,850,9867,039,0001,005,0002,531,328
9Jan 18, 2025 16:399,16022,208,8176,046,0002,015,0002,293,760
10Jan 18, 2025 16:419,16122,859,0225,039,0003,023,0002,490,368
11Jan 18, 2025 16:399,16925,881,1536,052,0002,017,0002,281,472
12Jan 18, 2025 16:419,20123,166,5346,073,0002,024,0002,531,328
13Jan 18, 2025 16:399,20224,323,9586,074,0002,024,0002,289,664
14Jan 18, 2025 16:419,20922,230,5377,091,0001,013,0002,285,568
15Jan 18, 2025 16:399,22425,214,9205,073,0003,044,0002,293,760
16Jan 18, 2025 16:419,22724,174,0485,075,0003,045,0002,285,568
17Jan 18, 2025 16:399,23626,187,8996,096,0002,032,0002,285,568
18Jan 18, 2025 16:419,24821,603,3346,104,0002,034,0002,531,328
19Jan 18, 2025 16:399,26423,572,5025,095,0003,057,0002,400,256
20Jan 18, 2025 16:399,26829,047,6156,117,0002,039,0002,289,664
21Jan 18, 2025 16:419,28024,315,7176,125,0002,041,0002,531,328
22Jan 18, 2025 16:399,29527,918,8735,113,0003,067,0002,457,600
23Jan 18, 2025 16:399,30223,450,6866,140,0002,046,0002,289,664
24Jan 18, 2025 16:399,30721,783,9956,143,0002,047,0002,285,568
25Jan 18, 2025 16:419,32723,853,7306,156,0002,052,0002,281,472