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 21, 2022 15:07Robert BurkeRobert BurkeScore: 81,640Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 21, 2022 15:0778,016439,938,048382,277,83202,289,664
2Jul 21, 2022 15:0778,037449,635,117382,382,04402,289,664
3Jul 21, 2022 15:0778,038434,725,004382,388,27802,281,472
4Jul 21, 2022 15:0678,047449,552,199382,427,85202,289,664
5Jul 21, 2022 15:0778,051431,156,556382,448,27102,289,664
6Jul 21, 2022 15:0678,066436,956,942382,521,63902,289,664
7Jul 21, 2022 15:0778,088442,564,343382,633,03402,293,760
8Jul 21, 2022 15:0678,126442,242,269382,817,56202,293,760
9Jul 21, 2022 15:0778,131449,193,112382,841,13402,289,664
10Jul 21, 2022 15:0781,590425,215,528398,792,000999,0002,281,472
11Jul 21, 2022 15:0681,593424,238,394397,809,0001,999,0002,514,944
12Jul 21, 2022 15:0681,618420,076,932397,930,0001,999,0002,281,472
13Jul 21, 2022 15:0781,621422,803,535398,943,000999,0002,281,472
14Jul 21, 2022 15:0781,624423,286,955398,958,000999,0002,281,472
15Jul 21, 2022 15:0681,624428,602,480397,959,0001,999,0002,281,472
16Jul 21, 2022 15:0781,629422,686,099398,981,000999,0002,281,472
17Jul 21, 2022 15:0781,635427,195,464399,012,0001,000,0002,281,472
18Jul 21, 2022 15:0781,638423,301,356398,025,0002,000,0002,424,832
19Jul 21, 2022 15:0781,640427,225,276398,035,0002,000,0002,428,928
20Jul 21, 2022 15:0781,640428,652,421399,038,0001,000,0002,281,472
21Jul 21, 2022 15:0781,641422,401,784399,041,0001,000,0002,281,472
22Jul 21, 2022 15:0781,643424,508,370399,050,0001,000,0002,433,024
23Jul 21, 2022 15:0681,646422,520,395399,067,0001,000,0002,428,928
24Jul 21, 2022 15:0781,647422,869,666400,072,00002,277,376
25Jul 21, 2022 15:0681,656419,561,088399,113,0001,000,0002,519,040
26Jul 21, 2022 15:0681,659422,923,083400,131,00002,428,928
27Jul 21, 2022 15:0681,666422,296,910399,165,0001,000,0002,420,736
28Jul 21, 2022 15:0781,668426,611,543400,171,00002,281,472
29Jul 21, 2022 15:0781,688422,678,232400,269,00002,281,472
30Jul 21, 2022 15:0781,698421,824,005399,322,0001,000,0002,519,040
31Jul 21, 2022 15:0781,713426,761,827399,397,000998,0002,281,472
32Jul 21, 2022 15:0681,730422,502,936399,479,000998,0002,281,472
33Jul 21, 2022 15:0781,740424,481,313399,526,000998,0002,424,832
34Jul 21, 2022 15:0681,754422,957,438399,595,000998,0002,281,472
35Jul 21, 2022 15:0781,760422,989,143398,625,0001,998,0002,437,120
36Jul 21, 2022 15:0781,773428,571,343399,691,000999,0002,281,472