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 2, 2021 15:30Yuriy LyfenkoYuriy LyfenkoScore: 104,137Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 2, 2021 15:30103,9021,040,073,532507,126,0001,996,0002,478,080
2Jul 2, 2021 15:30103,9281,040,475,394508,248,000998,0002,478,080
3Jul 2, 2021 15:30103,9441,035,891,675508,326,000998,0002,478,080
4Jul 2, 2021 15:30103,9491,040,768,519507,352,0001,997,0002,482,176
5Jul 2, 2021 15:30103,9521,042,282,193508,367,000998,0002,482,176
6Jul 2, 2021 15:30103,9541,034,274,016507,380,0001,997,0002,478,080
7Jul 2, 2021 15:30103,9911,037,882,814507,556,0001,998,0002,482,176
8Jul 2, 2021 15:30103,9941,035,669,598507,571,0001,998,0002,482,176
9Jul 2, 2021 15:30104,0091,040,522,094507,647,0001,998,0002,482,176
10Jul 2, 2021 15:30104,0151,030,017,424509,674,00002,342,912
11Jul 2, 2021 15:30104,0181,035,615,944507,688,0001,998,0002,482,176
12Jul 2, 2021 15:30104,0411,033,984,253507,802,0001,999,0002,478,080
13Jul 2, 2021 15:30104,1371,038,327,169508,273,0001,997,0002,260,992
14Jul 2, 2021 15:30104,1431,040,040,298508,303,0001,997,0002,260,992
15Jul 2, 2021 15:30104,1461,036,164,528508,319,0001,997,0002,482,176
16Jul 2, 2021 15:30104,1471,043,372,865509,323,000998,0002,523,136
17Jul 2, 2021 15:30104,1481,040,569,453509,328,000998,0002,482,176
18Jul 2, 2021 15:30104,3631,040,999,266509,382,0001,997,0002,482,176
19Jul 2, 2021 15:30120,4091,162,132,315590,004,48002,195,456
20Jul 2, 2021 15:30120,4201,141,620,250590,059,39902,203,648
21Jul 2, 2021 15:30120,4411,152,505,510590,160,37402,207,744
22Jul 2, 2021 15:30120,7631,159,861,670591,736,57102,195,456
23Jul 2, 2021 15:30120,7641,162,520,717591,745,96502,195,456
24Jul 2, 2021 15:30120,8111,163,090,729591,974,20102,191,360