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 listOct 4, 2022 15:52Robert BurkeRobert BurkeScore: 55,378Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 4, 2022 15:3752,880331,429,820259,113,56002,187,264
2Oct 4, 2022 15:3752,891324,362,194259,166,74002,183,168
3Oct 4, 2022 15:3952,942327,295,562259,415,06802,191,360
4Oct 4, 2022 15:5252,948330,115,884259,444,44902,174,976
5Oct 4, 2022 15:5252,966326,467,001259,531,79302,301,952
6Oct 4, 2022 15:4552,970340,693,609259,554,99802,179,072
7Oct 4, 2022 15:5252,983349,962,967259,616,93302,187,264
8Oct 4, 2022 15:3953,055336,170,248259,971,24902,179,072
9Oct 4, 2022 15:4553,081329,501,952260,097,81802,183,168
10Oct 4, 2022 15:3953,099323,080,808260,186,65602,179,072
11Oct 4, 2022 15:3753,169318,601,122260,528,75102,301,952
12Oct 4, 2022 15:4553,432322,296,628261,816,59102,170,880
13Oct 4, 2022 15:4555,346292,359,456270,195,0001,000,0002,281,472
14Oct 4, 2022 15:3955,353292,694,370270,229,0001,000,0002,441,216
15Oct 4, 2022 15:3955,357295,200,971270,247,0001,000,0002,445,312
16Oct 4, 2022 15:3755,364298,085,027270,285,0001,001,0002,281,472
17Oct 4, 2022 15:3755,364293,342,567269,291,0001,994,0002,281,472
18Oct 4, 2022 15:5255,365297,627,237270,288,0001,001,0002,437,120
19Oct 4, 2022 15:3955,367295,257,120270,296,0001,001,0002,281,472
20Oct 4, 2022 15:4555,368297,586,531270,304,0001,001,0002,277,376
21Oct 4, 2022 15:3755,369292,766,062270,308,0001,001,0002,281,472
22Oct 4, 2022 15:3955,370292,875,976270,310,0001,001,0002,535,424
23Oct 4, 2022 15:4555,370292,523,512270,313,0001,001,0002,445,312
24Oct 4, 2022 15:5255,371292,598,343270,315,0001,001,0002,281,472
25Oct 4, 2022 15:3755,378293,053,539270,351,0001,001,0002,281,472
26Oct 4, 2022 15:4555,378292,594,658270,352,0001,001,0002,281,472
27Oct 4, 2022 15:5255,378294,876,969270,353,0001,001,0002,437,120
28Oct 4, 2022 15:3955,381297,391,482270,365,0001,001,0002,281,472
29Oct 4, 2022 15:4555,382290,914,042270,370,0001,001,0002,281,472
30Oct 4, 2022 15:5255,387296,003,627270,393,0001,001,0002,445,312
31Oct 4, 2022 15:4555,388292,184,790270,398,0001,001,0002,281,472
32Oct 4, 2022 15:3755,391300,680,075270,414,0001,001,0002,445,312
33Oct 4, 2022 15:4555,392298,567,969270,419,0001,001,0002,281,472
34Oct 4, 2022 15:5255,394295,170,391270,428,0001,001,0002,535,424
35Oct 4, 2022 15:4555,397300,005,778269,448,0001,995,0002,281,472
36Oct 4, 2022 15:3955,397295,594,873270,446,000997,0002,445,312
37Oct 4, 2022 15:3955,400313,629,309270,459,0001,001,0002,441,216
38Oct 4, 2022 15:3755,403299,967,653270,473,0001,001,0002,281,472
39Oct 4, 2022 15:3755,418301,554,185269,550,0001,996,0002,449,408
40Oct 4, 2022 15:3955,434295,325,762269,629,0001,997,0002,441,216
41Oct 4, 2022 15:4555,447297,361,959269,692,0001,997,0002,281,472
42Oct 4, 2022 15:3755,453294,033,049269,724,0001,997,0002,281,472
43Oct 4, 2022 15:5255,461296,586,056269,760,0001,998,0002,281,472
44Oct 4, 2022 15:3955,575295,866,475270,323,0001,995,0002,281,472
45Oct 4, 2022 15:3755,905295,052,799271,937,0001,999,0002,445,312
46Oct 4, 2022 15:5255,927293,898,676272,044,0002,000,0002,281,472
47Oct 4, 2022 15:5255,931301,467,791272,063,0002,000,0002,281,472
48Oct 4, 2022 15:5255,949304,141,732273,148,0001,000,0002,281,472