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 listApr 27, 2024 16:05Hal FHal FScore: 56,863Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2024 16:0554,574331,965,902267,412,41402,289,664
2Apr 27, 2024 16:0554,577337,587,209267,425,10202,273,280
3Apr 27, 2024 16:0754,621331,009,405267,642,60002,293,760
4Apr 27, 2024 16:0754,888326,196,614268,949,75502,281,472
5Apr 27, 2024 16:0555,340333,425,802271,165,45302,281,472
6Apr 27, 2024 16:0755,368342,299,356271,304,02102,273,280
7Apr 27, 2024 16:0756,422301,872,939274,464,0002,003,0002,523,136
8Apr 27, 2024 16:0556,459300,298,661273,655,0002,996,0002,281,472
9Apr 27, 2024 16:0556,471304,592,523273,710,0002,996,0002,289,664
10Apr 27, 2024 16:0556,476302,612,692273,734,0002,997,0002,289,664
11Apr 27, 2024 16:0756,498299,054,079273,843,0002,998,0002,531,328
12Apr 27, 2024 16:0756,804304,929,577276,339,0002,002,0002,277,376
13Apr 27, 2024 16:0756,863314,791,089275,634,0002,996,0002,265,088
14Apr 27, 2024 16:0556,863309,859,606275,634,0002,996,0002,367,488
15Apr 27, 2024 16:0757,017311,105,812278,383,0001,001,0002,289,664
16Apr 27, 2024 16:0557,031301,022,239277,447,0002,003,0002,285,568
17Apr 27, 2024 16:0757,040306,527,806278,496,0001,001,0002,289,664
18Apr 27, 2024 16:0757,064305,381,933277,619,0001,997,0002,371,584
19Apr 27, 2024 16:0557,480310,082,844280,656,000998,0002,531,328
20Apr 27, 2024 16:0757,482310,145,425278,666,0002,996,0002,289,664
21Apr 27, 2024 16:0757,512307,052,089278,811,0002,997,0002,289,664
22Apr 27, 2024 16:0557,542305,364,971278,956,0002,999,0002,289,664
23Apr 27, 2024 16:0560,388317,741,880294,901,000999,0002,523,136
24Apr 27, 2024 16:05173,202876,435,516845,692,0002,998,0002,281,472