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 12:19Robert BurkeRobert BurkeScore: 55,383Success
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 11:5852,901319,900,958259,214,46902,183,168
2Oct 4, 2022 12:0052,912339,278,959259,266,93502,183,168
3Oct 4, 2022 12:1852,914332,817,011259,279,59102,187,264
4Oct 4, 2022 12:0052,917332,783,104259,295,42502,187,264
5Oct 4, 2022 11:5852,935325,214,916259,382,72602,191,360
6Oct 4, 2022 11:5852,948322,705,380259,443,93802,174,976
7Oct 4, 2022 12:1852,953327,610,962259,468,30302,179,072
8Oct 4, 2022 12:1952,966327,777,990259,534,71302,174,976
9Oct 4, 2022 12:0052,977318,181,245259,586,42202,179,072
10Oct 4, 2022 12:2552,988318,476,628259,640,99002,174,976
11Oct 4, 2022 12:2552,989333,244,929259,646,74402,174,976
12Oct 4, 2022 12:1953,040325,231,015259,898,02402,183,168
13Oct 4, 2022 12:1853,105326,262,585260,213,12402,183,168
14Oct 4, 2022 12:2554,392319,276,210266,520,01302,187,264
15Oct 4, 2022 12:1954,554342,359,446267,313,09202,179,072
16Oct 4, 2022 12:0055,351298,548,404270,221,0001,000,0002,441,216
17Oct 4, 2022 12:0055,361290,108,196270,267,0001,000,0002,269,184
18Oct 4, 2022 12:1955,364295,890,832270,283,0001,001,0002,281,472
19Oct 4, 2022 12:1855,367292,904,940270,295,0001,001,0002,281,472
20Oct 4, 2022 12:1955,369294,305,218270,307,0001,001,0002,281,472
21Oct 4, 2022 11:5855,370303,016,130270,312,0001,001,0002,269,184
22Oct 4, 2022 11:5855,370298,398,596269,319,0001,994,0002,281,472
23Oct 4, 2022 11:5855,371292,625,446270,318,0001,001,0002,281,472
24Oct 4, 2022 12:1855,372293,838,208270,321,0001,001,0002,281,472
25Oct 4, 2022 12:1955,376294,749,822270,342,0001,001,0002,281,472
26Oct 4, 2022 12:0055,379299,649,202270,357,0001,001,0002,281,472
27Oct 4, 2022 12:2555,379294,274,783270,356,0001,001,0002,445,312
28Oct 4, 2022 11:5855,379302,301,018270,355,0001,001,0002,281,472
29Oct 4, 2022 12:2555,380295,923,406270,359,0001,001,0002,281,472
30Oct 4, 2022 12:1955,381293,220,272270,366,0001,001,0002,449,408
31Oct 4, 2022 11:5855,383292,772,571270,374,0001,001,0002,281,472
32Oct 4, 2022 12:0055,389294,953,405269,413,0001,995,0002,441,216
33Oct 4, 2022 12:2555,392297,720,490270,419,0001,001,0002,449,408
34Oct 4, 2022 11:5855,396299,772,278270,438,0001,001,0002,281,472
35Oct 4, 2022 12:1855,397298,038,086270,444,0001,001,0002,281,472
36Oct 4, 2022 12:2555,398303,950,506271,451,00002,281,472
37Oct 4, 2022 12:1855,402294,906,876270,467,0001,001,0002,445,312
38Oct 4, 2022 12:2555,402302,479,307270,467,0001,001,0002,281,472
39Oct 4, 2022 12:2555,402299,664,581271,468,00002,281,472
40Oct 4, 2022 12:1855,409302,588,948270,503,0001,001,0002,449,408
41Oct 4, 2022 11:5855,411298,113,322270,511,0001,001,0002,281,472
42Oct 4, 2022 12:0055,418292,864,100269,553,0001,996,0002,445,312
43Oct 4, 2022 12:1955,422300,667,424269,570,0001,996,0002,281,472
44Oct 4, 2022 12:1955,440291,586,823269,658,0001,997,0002,449,408
45Oct 4, 2022 12:1855,440298,815,767269,661,0001,997,0002,281,472
46Oct 4, 2022 12:1955,442298,749,802269,671,0001,997,0002,281,472
47Oct 4, 2022 11:5855,446302,106,941269,688,0001,997,0002,281,472
48Oct 4, 2022 12:1855,447294,816,208269,691,0001,997,0002,281,472
49Oct 4, 2022 12:2555,457297,615,195269,739,0001,998,0002,445,312
50Oct 4, 2022 12:1955,458296,974,866269,748,0001,998,0002,445,312
51Oct 4, 2022 11:5855,469292,033,705269,801,0001,998,0002,441,216
52Oct 4, 2022 12:1855,607293,853,577271,472,0001,001,0002,281,472
53Oct 4, 2022 12:0055,757292,928,724272,209,0001,000,0002,281,472
54Oct 4, 2022 12:2555,825297,892,919271,545,0001,996,0002,449,408
55Oct 4, 2022 12:0055,852302,685,700271,677,0001,997,0002,445,312
56Oct 4, 2022 12:1855,855299,478,085271,693,0001,997,0002,441,216
57Oct 4, 2022 12:0055,862301,628,611271,727,0001,997,0002,441,216
58Oct 4, 2022 12:0055,900295,966,052271,911,0001,999,0002,445,312
59Oct 4, 2022 12:2555,904292,197,462271,931,0001,999,0002,441,216
60Oct 4, 2022 12:1955,909294,992,693271,955,0001,999,0002,281,472