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 22, 2022 03:13Robert BurkeRobert BurkeScore: 64,664Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 22, 2022 03:1363,404363,325,006310,678,85802,293,760
2Jul 22, 2022 03:0463,424370,774,490310,776,22802,285,568
3Jul 22, 2022 03:0463,448374,043,649310,894,34802,289,664
4Jul 22, 2022 03:1263,454376,230,282310,925,94702,293,760
5Jul 22, 2022 03:1363,454377,572,577310,924,46302,281,472
6Jul 22, 2022 06:1563,459386,546,373310,947,86202,293,760
7Jul 22, 2022 06:1563,464363,492,195310,973,63402,285,568
8Jul 22, 2022 06:1563,472372,474,009311,011,41202,297,856
9Jul 22, 2022 03:1363,505375,133,861311,175,38702,297,856
10Jul 22, 2022 03:1364,588341,042,677316,479,00002,281,472
11Jul 22, 2022 06:1564,599343,539,150316,535,00002,281,472
12Jul 22, 2022 03:0464,601340,441,111314,550,0001,997,0002,428,928
13Jul 22, 2022 03:0464,621342,621,484314,644,0001,997,0002,437,120
14Jul 22, 2022 03:0464,629334,912,070315,682,000998,0002,281,472
15Jul 22, 2022 06:1564,630341,060,132315,688,000999,0002,281,472
16Jul 22, 2022 03:1264,630338,865,703315,687,000999,0002,281,472
17Jul 22, 2022 03:1364,630338,206,968315,687,000999,0002,281,472
18Jul 22, 2022 03:1264,643345,515,083315,753,000999,0002,424,832
19Jul 22, 2022 03:0464,644339,790,155315,759,000999,0002,281,472
20Jul 22, 2022 06:1564,645343,003,171314,762,0001,998,0002,281,472
21Jul 22, 2022 06:1564,652341,431,353315,795,000999,0002,424,832
22Jul 22, 2022 06:1564,654339,910,813314,807,0001,998,0002,281,472
23Jul 22, 2022 03:1364,654346,200,177315,807,000999,0002,433,024
24Jul 22, 2022 03:0464,664342,502,745315,857,000999,0002,428,928
25Jul 22, 2022 03:0464,664338,883,209314,853,0001,999,0002,428,928
26Jul 22, 2022 06:1564,665341,925,421315,861,000999,0002,420,736
27Jul 22, 2022 03:0464,666343,143,255315,866,000999,0002,437,120
28Jul 22, 2022 03:1264,673335,869,038314,898,0001,999,0002,281,472
29Jul 22, 2022 06:1564,677339,973,575314,916,0001,999,0002,277,376
30Jul 22, 2022 03:1264,685338,557,115314,957,0001,999,0002,281,472
31Jul 22, 2022 06:1564,692337,850,869314,993,0001,999,0002,277,376
32Jul 22, 2022 03:1264,698342,666,210315,022,0002,000,0002,281,472
33Jul 22, 2022 03:0464,701338,719,242315,033,0002,000,0002,433,024
34Jul 22, 2022 06:1564,703337,747,486316,044,0001,000,0002,428,928
35Jul 22, 2022 03:1264,707341,902,070316,063,0001,000,0002,281,472
36Jul 22, 2022 03:1364,710338,952,612315,079,0002,000,0002,281,472
37Jul 22, 2022 03:1364,720339,874,306317,129,00002,281,472
38Jul 22, 2022 03:1264,783346,776,230316,434,0001,001,0002,281,472
39Jul 22, 2022 03:1265,071348,200,053317,847,000999,0002,424,832
40Jul 22, 2022 03:1265,286339,099,130317,902,0001,999,0002,281,472
41Jul 22, 2022 03:1365,296340,421,385319,951,00002,514,944
42Jul 22, 2022 03:1365,307348,717,110320,002,00002,281,472
43Jul 22, 2022 03:1365,724343,736,908322,047,00002,428,928
44Jul 22, 2022 03:0465,744350,395,207321,145,0001,000,0002,281,472
45Jul 22, 2022 03:1365,850348,564,868321,669,000998,0002,428,928
46Jul 22, 2022 03:1266,353409,146,038325,127,26502,289,664
47Jul 22, 2022 03:1267,200390,491,738329,280,80402,289,664
48Jul 22, 2022 03:0467,941383,240,196332,908,75002,289,664