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 listDec 9, 2021 08:18Yuriy LyfenkoYuriy LyfenkoScore: 100,176Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 9, 2021 08:1899,640550,908,104488,235,69102,207,744
2Dec 9, 2021 08:1999,666563,630,260488,363,09002,211,840
3Dec 9, 2021 17:3199,668571,045,173488,374,16802,203,648
4Dec 9, 2021 08:1999,691554,985,786488,484,56602,207,744
5Dec 9, 2021 08:1899,697546,621,182488,514,21802,211,840
6Dec 9, 2021 17:3199,711550,404,484488,584,55602,207,744
7Dec 9, 2021 17:3199,760551,999,310488,821,79402,211,840
8Dec 9, 2021 08:1999,796540,574,103489,000,49202,203,648
9Dec 9, 2021 08:1899,805547,560,421489,044,37502,203,648
10Dec 9, 2021 17:31100,127519,770,330488,622,0001,998,0002,265,088
11Dec 9, 2021 17:31100,128522,429,147488,627,0001,998,0002,527,232
12Dec 9, 2021 17:31100,138521,162,669488,677,0001,998,0002,265,088
13Dec 9, 2021 08:18100,145517,739,017488,711,0001,998,0002,338,816
14Dec 9, 2021 17:31100,146516,091,766488,716,0001,998,0002,465,792
15Dec 9, 2021 08:19100,154522,498,315488,757,0001,999,0002,265,088
16Dec 9, 2021 08:18100,155524,051,891488,762,0001,999,0002,342,912
17Dec 9, 2021 08:19100,161516,688,609488,792,0001,999,0002,527,232
18Dec 9, 2021 17:31100,168517,417,701488,826,0001,999,0002,347,008
19Dec 9, 2021 17:31100,176519,730,560489,864,000999,0002,342,912
20Dec 9, 2021 08:19100,178517,416,618488,874,0001,999,0002,342,912
21Dec 9, 2021 08:19100,180515,139,352488,883,0001,999,0002,265,088
22Dec 9, 2021 17:31100,182519,749,532488,895,0001,999,0002,465,792
23Dec 9, 2021 08:19100,190521,788,102488,930,0001,999,0002,330,624
24Dec 9, 2021 08:19100,200518,376,753488,979,0001,999,0002,424,832
25Dec 9, 2021 08:19100,201519,377,047488,988,0001,999,0002,265,088
26Dec 9, 2021 08:18100,202515,889,256489,992,000999,0002,416,640
27Dec 9, 2021 08:18100,208520,539,940490,018,0001,000,0002,269,184
28Dec 9, 2021 08:18100,218513,531,287489,067,0002,000,0002,265,088
29Dec 9, 2021 08:18100,227517,879,159489,111,0002,000,0002,338,816
30Dec 9, 2021 08:18100,227519,162,115490,113,0001,000,0002,269,184
31Dec 9, 2021 08:19100,230512,328,432490,127,0001,000,0002,347,008
32Dec 9, 2021 08:19100,240517,943,871490,177,0001,000,0002,265,088
33Dec 9, 2021 08:18100,261516,719,444491,278,00002,338,816
34Dec 9, 2021 17:31100,272520,438,624489,337,0001,997,0002,265,088
35Dec 9, 2021 08:18100,281518,257,741491,379,00002,461,696
36Dec 9, 2021 17:31100,289516,578,661489,420,0001,997,0002,265,088