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 08:32gchebanovgchebanovScore: 186,459Success
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 08:32155,828827,340,616763,556,43902,228,224
2Jul 1, 2021 08:32156,038828,734,156764,587,88602,220,032
3Jul 1, 2021 08:32156,087836,991,889764,826,75402,220,032
4Jul 1, 2021 08:32156,139824,135,405765,080,38802,224,128
5Jul 1, 2021 08:32156,160818,822,703765,181,88002,220,032
6Jul 1, 2021 08:32156,294821,790,076765,840,65302,215,936
7Jul 1, 2021 08:32156,340821,696,319766,064,21002,224,128
8Jul 1, 2021 08:32156,429836,593,342766,501,75102,228,224
9Jul 1, 2021 08:32158,497836,127,628776,637,17402,220,032
10Jul 1, 2021 08:32158,707836,145,746777,664,83502,220,032
11Jul 1, 2021 08:32158,790860,513,864778,070,17802,224,128
12Jul 1, 2021 08:32158,918851,452,400778,699,36702,224,128
13Jul 1, 2021 08:32186,334934,388,348912,035,0001,000,0002,265,088
14Jul 1, 2021 08:32186,372939,648,483912,223,000999,0002,351,104
15Jul 1, 2021 08:32186,391940,263,754911,320,0001,998,0002,314,240
16Jul 1, 2021 08:32186,401941,991,698912,368,000999,0002,383,872
17Jul 1, 2021 08:32186,406942,047,777912,392,000999,0002,338,816
18Jul 1, 2021 08:32186,416942,881,150911,438,0001,998,0002,498,560
19Jul 1, 2021 08:32186,429943,683,289911,504,0001,998,0002,306,048
20Jul 1, 2021 08:32186,438941,196,936912,548,000999,0002,326,528
21Jul 1, 2021 08:32186,441938,776,964912,563,000999,0002,342,912
22Jul 1, 2021 08:32186,441941,991,359911,561,0001,999,0002,342,912
23Jul 1, 2021 08:32186,442942,236,787911,566,0001,999,0002,342,912
24Jul 1, 2021 08:32186,456941,986,036912,633,000999,0002,289,664
25Jul 1, 2021 08:32186,459941,097,946911,652,0001,999,0002,396,160
26Jul 1, 2021 08:32186,487941,879,709912,787,000999,0002,338,816
27Jul 1, 2021 08:32186,491932,017,159912,808,000999,0002,523,136
28Jul 1, 2021 08:32186,501940,576,774910,856,0002,999,0002,383,872
29Jul 1, 2021 08:32186,546938,270,729912,074,0002,000,0002,355,200
30Jul 1, 2021 08:32186,590948,507,489912,295,0001,998,0002,387,968
31Jul 1, 2021 08:32186,597943,627,013912,329,0001,998,0002,347,008
32Jul 1, 2021 08:32186,599939,916,175911,338,0002,997,0002,404,352
33Jul 1, 2021 08:32186,610940,735,111913,391,000999,0002,494,464
34Jul 1, 2021 08:32186,649943,622,085912,581,0001,999,0002,322,432
35Jul 1, 2021 08:32186,685940,722,973912,758,0001,999,0002,363,392
36Jul 1, 2021 08:32186,759942,864,455912,120,0002,997,0002,404,352
37Jul 1, 2021 08:32186,931948,006,021914,961,000999,0002,277,376
38Jul 1, 2021 08:32186,961946,821,776915,109,000999,0002,277,376
39Jul 1, 2021 08:32186,979948,635,089914,198,0001,998,0002,363,392
40Jul 1, 2021 08:32187,029949,521,433913,446,0002,998,0002,383,872
41Jul 1, 2021 08:32187,041947,921,720914,502,0001,998,0002,265,088
42Jul 1, 2021 08:32187,044946,201,788913,519,0002,998,0002,301,952
43Jul 1, 2021 08:32187,047946,757,012915,529,000999,0002,490,368
44Jul 1, 2021 08:32187,128945,210,675914,926,0001,999,0002,375,680
45Jul 1, 2021 08:32187,166944,784,447917,111,00002,293,760
46Jul 1, 2021 08:32187,167946,752,428913,121,0003,996,0002,523,136
47Jul 1, 2021 08:32187,168946,743,547916,125,0001,000,0002,387,968
48Jul 1, 2021 08:32187,323944,678,395916,883,000999,0002,277,376