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 listJan 22, 2024 08:20matsuoka-601matsuoka-601Score: 75,034Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 22, 2024 08:2071,741423,415,604351,533,26402,269,184
2Jan 22, 2024 08:2671,754417,378,386351,595,80202,277,376
3Jan 22, 2024 08:2071,763430,159,986351,639,10802,269,184
4Jan 22, 2024 08:2671,785425,893,901351,747,33602,285,568
5Jan 22, 2024 08:2671,811426,740,314351,875,87702,256,896
6Jan 22, 2024 08:2071,975417,117,127352,675,45602,273,280
7Jan 22, 2024 08:2074,957394,093,073367,287,00002,285,568
8Jan 22, 2024 08:2074,968390,791,965365,343,0002,001,0002,285,568
9Jan 22, 2024 08:2675,010389,604,358364,552,0002,996,0002,379,776
10Jan 22, 2024 08:2675,019395,625,678364,598,0002,996,0002,285,568
11Jan 22, 2024 08:2675,022396,764,111364,610,0002,996,0002,285,568
12Jan 22, 2024 08:2075,022393,293,409365,609,0001,997,0002,523,136
13Jan 22, 2024 08:2075,034391,412,133365,670,0001,998,0002,383,872
14Jan 22, 2024 08:2675,036395,996,262364,678,0002,997,0002,273,280
15Jan 22, 2024 08:2675,057390,978,222365,781,0001,998,0002,285,568
16Jan 22, 2024 08:2675,080389,436,121364,893,0002,999,0002,285,568
17Jan 22, 2024 08:2675,160401,956,962366,285,0002,001,0002,273,280
18Jan 22, 2024 08:2675,178395,131,366366,372,0002,002,0002,527,232
19Jan 22, 2024 08:2076,837405,388,892374,499,0002,002,0002,285,568
20Jan 22, 2024 08:2076,876402,674,611373,695,0002,997,0002,285,568
21Jan 22, 2024 08:2076,891401,188,995373,766,0002,998,0002,285,568
22Jan 22, 2024 08:2676,929402,901,813373,952,0002,999,0002,523,136
23Jan 22, 2024 08:2076,957400,035,317376,088,0001,000,0002,285,568
24Jan 22, 2024 08:2086,745446,526,969423,051,0002,000,0002,285,568