Format integers Sergey Svistunov

Compute a checksum over the decimal representations of binary integers as fast as possible.

Input: 250 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: A uint64 checksum computed as:

CRC = sum of number_crc(n) for each n

where number_crc(n) converts n to its decimal string and sums ascii(digit) * position over each digit (0-indexed from the left).

Example: For n = 42, the decimal string is "42", so number_crc(42) = ascii('4') * 0 + ascii('2') * 1 = 52 * 0 + 50 * 1 = 50.

Back to listJul 20, 2022 13:32Robert BurkeRobert BurkeScore: 99,984Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 20, 2022 13:3497,195540,595,506476,253,25702,297,856
2Jul 20, 2022 13:3297,208535,148,535476,320,19402,285,568
3Jul 20, 2022 13:3497,228554,125,184476,415,44402,277,376
4Jul 20, 2022 13:3297,230528,598,810476,428,85402,289,664
5Jul 20, 2022 13:3297,244546,427,346476,497,51702,285,568
6Jul 20, 2022 13:3397,256532,366,083476,553,81402,256,896
7Jul 20, 2022 13:3497,289536,040,713476,716,50702,285,568
8Jul 20, 2022 13:3397,327534,452,854476,902,38902,289,664
9Jul 20, 2022 13:3399,934511,201,932488,680,000999,0002,281,472
10Jul 20, 2022 13:3499,944511,089,618488,729,000999,0002,428,928
11Jul 20, 2022 13:3399,955510,827,590487,780,0001,999,0002,277,376
12Jul 20, 2022 13:3299,957511,716,640488,791,000999,0002,424,832
13Jul 20, 2022 13:3499,959511,782,763489,798,00002,433,024
14Jul 20, 2022 13:3499,961510,892,856488,808,000999,0002,514,944
15Jul 20, 2022 13:3499,964511,558,268488,826,000999,0002,277,376
16Jul 20, 2022 13:3399,970516,718,144487,852,0001,999,0002,420,736
17Jul 20, 2022 13:3299,979510,644,120487,896,0001,999,0002,428,928
18Jul 20, 2022 13:3399,984516,226,230488,924,000999,0002,281,472
19Jul 20, 2022 13:3299,984513,246,848488,924,000999,0002,281,472
20Jul 20, 2022 13:3399,984510,485,100488,922,000999,0002,281,472
21Jul 20, 2022 13:3499,985509,957,983488,926,000999,0002,519,040
22Jul 20, 2022 13:3299,985518,667,273487,929,0001,999,0002,433,024
23Jul 20, 2022 13:3399,986519,452,481487,930,0001,999,0002,281,472
24Jul 20, 2022 13:3499,987511,179,187487,935,0001,999,0002,281,472
25Jul 20, 2022 13:3399,996515,559,422488,979,000999,0002,281,472
26Jul 20, 2022 13:3299,996512,450,502488,983,000999,0002,519,040
27Jul 20, 2022 13:3499,997513,421,720489,987,00002,281,472
28Jul 20, 2022 13:3299,999511,933,184488,996,000999,0002,281,472
29Jul 20, 2022 13:33100,009513,188,983489,044,0001,000,0002,281,472
30Jul 20, 2022 13:34100,011513,653,117489,056,0001,000,0002,281,472
31Jul 20, 2022 13:32100,012511,568,455488,061,0002,000,0002,428,928
32Jul 20, 2022 13:34100,020514,139,253490,099,00002,277,376
33Jul 20, 2022 13:32100,021521,967,467490,105,00002,433,024
34Jul 20, 2022 13:33100,023511,717,128489,111,0001,000,0002,420,736
35Jul 20, 2022 13:32100,059519,362,035489,291,000998,0002,281,472
36Jul 20, 2022 13:33104,137561,194,783510,271,95102,293,760