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 1, 2021 09:40gchebanovgchebanovScore: 199,226Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 1, 2021 09:40151,548796,637,240742,587,14302,260,992
2Jul 1, 2021 09:40151,847823,996,536744,048,79602,256,896
3Jul 1, 2021 09:40151,966804,555,770744,631,98902,265,088
4Jul 1, 2021 09:40152,004798,953,820744,817,87102,260,992
5Jul 1, 2021 09:40153,265810,555,192751,000,60802,256,896
6Jul 1, 2021 09:40153,407815,665,375751,695,83802,265,088
7Jul 1, 2021 09:40199,1361,001,645,529973,765,0001,999,0002,404,352
8Jul 1, 2021 09:40199,150997,854,699974,837,000999,0002,408,448
9Jul 1, 2021 09:40199,1541,003,940,190974,856,000998,0002,396,160
10Jul 1, 2021 09:40199,1631,001,346,555973,901,0001,997,0002,404,352
11Jul 1, 2021 09:40199,1651,002,357,220974,908,000999,0002,404,352
12Jul 1, 2021 09:40199,2231,001,636,311974,193,0001,998,0002,400,256
13Jul 1, 2021 09:40199,2261,005,107,370975,207,000999,0002,523,136
14Jul 1, 2021 09:40199,2401,005,651,133974,280,0001,998,0002,396,160
15Jul 1, 2021 09:40199,3281,002,004,514974,707,0001,999,0002,400,256
16Jul 1, 2021 09:40199,3301,004,442,403975,716,000999,0002,400,256
17Jul 1, 2021 09:40199,390999,583,629977,011,00002,514,944
18Jul 1, 2021 09:40199,4091,006,955,689975,103,0002,000,0002,461,696
19Jul 1, 2021 09:40199,4221,003,017,709976,170,000999,0002,535,424
20Jul 1, 2021 09:40199,4621,005,041,387976,365,000999,0002,273,280
21Jul 1, 2021 09:40199,4771,004,025,744976,439,000999,0002,412,544
22Jul 1, 2021 09:40199,5041,000,075,536977,569,00002,514,944
23Jul 1, 2021 09:40199,5161,004,058,187976,629,000999,0002,428,928
24Jul 1, 2021 09:40199,5461,001,121,534977,774,00002,523,136