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 listAug 1, 2022 09:46Robert BurkeRobert BurkeScore: 61,516Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 4, 2022 09:2259,409358,240,102291,103,49902,187,264
2Oct 4, 2022 09:2259,413352,904,988291,126,09802,187,264
3Oct 4, 2022 09:2259,415353,822,941291,132,36702,174,976
4Oct 4, 2022 09:1259,444368,979,604291,275,96802,183,168
5Aug 1, 2022 09:4659,472355,084,865291,414,61902,174,976
6Aug 1, 2022 09:4659,479359,144,198291,445,12702,179,072
7Oct 4, 2022 09:1259,483351,319,328291,467,16902,183,168
8Aug 1, 2022 09:4659,484361,401,355291,472,46702,187,264
9Oct 4, 2022 09:1259,491360,498,932291,507,32702,301,952
10Oct 4, 2022 09:2261,453332,662,040300,118,0001,000,0002,281,472
11Oct 4, 2022 09:1261,492324,067,886300,310,0001,001,0002,441,216
12Aug 1, 2022 09:4661,493330,536,235300,313,0001,001,0002,281,472
13Oct 4, 2022 09:2261,494329,035,670300,321,0001,001,0002,445,312
14Oct 4, 2022 09:1261,495323,611,193300,324,0001,001,0002,281,472
15Oct 4, 2022 09:2261,504322,960,284300,370,0001,001,0002,281,472
16Oct 4, 2022 09:2261,507329,263,812300,385,0001,001,0002,281,472
17Aug 1, 2022 09:4661,509321,151,190299,398,0001,995,0002,281,472
18Oct 4, 2022 09:2261,512326,745,563300,410,0001,001,0002,445,312
19Aug 1, 2022 09:4661,516329,333,674300,428,0001,001,0002,441,216
20Oct 4, 2022 09:2261,519327,468,199300,442,0001,001,0002,445,312
21Oct 4, 2022 09:1261,519330,464,702300,443,0001,001,0002,281,472
22Oct 4, 2022 09:1261,521327,895,341299,455,0001,996,0002,441,216
23Oct 4, 2022 09:1261,526323,395,919299,481,0001,996,0002,445,312
24Oct 4, 2022 09:1261,531334,243,042300,503,000998,0002,281,472
25Aug 1, 2022 09:4661,541323,222,394299,552,0001,997,0002,441,216
26Aug 1, 2022 09:4661,554323,976,663299,617,0001,997,0002,441,216
27Oct 4, 2022 09:2261,557330,028,360300,630,000998,0002,441,216
28Oct 4, 2022 09:1261,560325,373,221299,646,0001,997,0002,449,408
29Aug 1, 2022 09:4661,574331,823,765299,717,0001,998,0002,445,312
30Oct 4, 2022 09:1261,586330,620,540299,773,0001,998,0002,281,472
31Oct 4, 2022 09:1261,603327,382,651299,856,0001,999,0002,281,472
32Oct 4, 2022 09:2261,668324,262,941301,174,0001,000,0002,281,472
33Aug 1, 2022 09:4661,757329,412,009299,615,0002,996,0002,281,472
34Oct 4, 2022 09:2261,764330,461,875300,648,0001,997,0002,449,408
35Aug 1, 2022 09:4661,981325,444,461302,707,0001,002,0002,281,472
36Aug 1, 2022 09:4662,512327,992,404305,307,0001,001,0002,457,600