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 listOct 2, 2023 12:27apuxbtapuxbtError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 2, 2023 12:2700000Error: Exit with code 255: [timer] precalc: 125us [timer] pretest: 16158us pre-test failed! numbers chunk: 1871731171 1328465278 759933241 34653248 1567797801 1255698198 1692058440 203228929 prime: 3 mul:2863311531 cmp: 1431655765 number 1567797801 fa...stderr