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:05Robert BurkeRobert BurkeScore: 97,595Success
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:0596,035528,163,125470,569,44402,289,664
2Jul 20, 2022 13:0596,039527,711,684470,589,60702,293,760
3Jul 20, 2022 13:5796,042536,221,466470,606,61002,297,856
4Jul 20, 2022 13:3596,049524,785,899470,639,13702,289,664
5Jul 20, 2022 13:5796,061545,070,345470,697,11402,285,568
6Jul 20, 2022 13:3596,076541,923,075470,774,14402,289,664
7Jul 20, 2022 13:0596,081536,993,508470,798,88302,289,664
8Jul 20, 2022 13:3597,537504,031,743476,934,000999,0002,433,024
9Jul 20, 2022 13:5797,538498,785,859476,939,000999,0002,424,832
10Jul 20, 2022 13:3597,568500,388,259477,081,0001,000,0002,428,928
11Jul 20, 2022 13:5797,571500,277,771477,097,0001,000,0002,281,472
12Jul 20, 2022 13:5797,573499,435,747477,109,0001,000,0002,424,832
13Jul 20, 2022 13:0597,574501,900,714477,111,0001,000,0002,433,024
14Jul 20, 2022 13:0597,578496,770,369477,132,0001,000,0002,424,832
15Jul 20, 2022 13:5797,580500,673,485477,140,0001,000,0002,281,472
16Jul 20, 2022 13:3597,583497,224,367478,156,00002,433,024
17Jul 20, 2022 13:0597,593502,473,437478,206,00002,281,472
18Jul 20, 2022 13:3597,593506,316,838478,205,00002,428,928
19Jul 20, 2022 13:3597,595506,164,861478,217,00002,281,472
20Jul 20, 2022 13:5797,597497,647,116478,223,00002,281,472
21Jul 20, 2022 13:0597,610504,119,825477,289,000998,0002,281,472
22Jul 20, 2022 13:0597,611496,450,784478,293,00002,281,472
23Jul 20, 2022 13:3597,612505,588,773477,299,0001,000,0002,277,376
24Jul 20, 2022 13:3597,615507,602,628478,315,00002,424,832
25Jul 20, 2022 13:3597,616502,924,616478,316,00002,514,944
26Jul 20, 2022 13:0597,618502,920,813477,328,0001,000,0002,424,832
27Jul 20, 2022 13:5797,618509,233,709477,326,0001,000,0002,281,472
28Jul 20, 2022 13:0597,626510,344,022478,369,00002,281,472
29Jul 20, 2022 13:0597,626507,638,279478,368,00002,277,376
30Jul 20, 2022 13:3597,662499,332,302476,545,0001,998,0002,514,944
31Jul 20, 2022 13:0597,665505,245,736477,561,000999,0002,281,472
32Jul 20, 2022 13:5797,672505,564,966477,595,000999,0002,281,472
33Jul 20, 2022 13:5797,676504,092,700477,614,000999,0002,281,472
34Jul 20, 2022 13:5797,683501,929,062476,648,0001,998,0002,514,944
35Jul 20, 2022 13:35103,639570,033,711507,830,60402,281,472
36Jul 20, 2022 13:57103,645574,225,568507,860,73102,293,760