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 06:59Yuriy LyfenkoYuriy LyfenkoScore: 102,014Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 21, 2021 17:54101,8971,029,219,947499,294,00002,482,176
2Oct 28, 2021 17:28101,9011,026,208,698497,316,0001,997,0002,482,176
3Oct 28, 2021 17:28101,9121,028,485,710498,370,000998,0002,461,696
4Oct 28, 2021 17:28101,9181,030,116,432497,399,0001,997,0002,478,080
5Dec 9, 2021 06:59101,9201,027,517,072498,412,000998,0002,478,080
6Oct 28, 2021 17:31101,9281,028,268,402497,452,0001,997,0002,482,176
7Oct 28, 2021 17:31101,9441,025,469,566498,529,000999,0002,482,176
8Oct 28, 2021 17:31101,9491,024,277,850498,551,000999,0002,482,176
9Aug 21, 2021 17:54101,9531,029,107,261497,573,0001,998,0002,478,080
10Aug 21, 2021 17:54101,9531,029,570,906498,571,000999,0002,338,816
11Oct 28, 2021 17:31101,9541,025,443,877497,576,0001,998,0002,473,984
12Aug 21, 2021 17:54101,9621,030,187,412498,617,000999,0002,478,080
13Dec 9, 2021 06:59101,9661,027,960,006497,636,0001,998,0002,482,176
14Oct 28, 2021 17:31101,9751,031,763,112497,680,0001,998,0002,478,080
15Oct 28, 2021 17:28101,9771,025,617,137498,688,000999,0002,478,080
16Oct 28, 2021 17:31101,9781,033,581,178497,693,0001,998,0002,478,080
17Oct 28, 2021 17:31101,9791,029,070,316497,699,0001,998,0002,478,080
18Aug 21, 2021 17:54101,9861,021,138,767499,732,00002,482,176
19Aug 21, 2021 17:54101,9931,024,695,213497,767,0001,999,0002,347,008
20Dec 9, 2021 06:59101,9971,028,082,556497,788,0001,999,0002,482,176
21Oct 28, 2021 17:31102,0031,025,721,922497,817,0001,999,0002,478,080
22Dec 9, 2021 06:59102,0041,025,823,209497,823,0001,999,0002,490,368
23Oct 28, 2021 17:28102,0061,025,354,691497,832,0001,999,0002,478,080
24Aug 21, 2021 17:54102,0101,025,638,316497,850,0001,999,0002,420,736
25Dec 9, 2021 06:59102,0141,027,440,379497,871,0001,999,0002,482,176
26Aug 21, 2021 17:54102,0161,024,124,331499,880,00002,338,816
27Dec 9, 2021 06:59102,0181,024,505,216498,891,000999,0002,482,176
28Oct 28, 2021 17:28102,0501,021,588,238499,044,0001,000,0002,478,080
29Dec 9, 2021 06:59102,0511,022,575,447500,048,00002,347,008
30Oct 28, 2021 17:31102,0541,033,439,272500,063,00002,482,176
31Oct 28, 2021 17:28102,0611,025,478,680500,097,00002,478,080
32Aug 21, 2021 17:54102,0621,027,815,417500,106,00002,478,080
33Dec 9, 2021 06:59102,1011,030,278,019499,295,0001,000,0002,478,080
34Oct 28, 2021 17:28102,1121,026,926,765498,352,0001,997,0002,478,080
35Dec 9, 2021 06:59102,1521,024,266,328499,547,000999,0002,478,080
36Oct 28, 2021 17:28102,1551,030,147,575499,560,000999,0002,478,080
37Aug 21, 2021 17:54102,9611,072,572,266504,510,34402,191,360
38Oct 28, 2021 17:28103,0171,075,357,927504,785,52002,195,456
39Dec 9, 2021 06:59103,0181,067,293,007504,787,71502,195,456
40Aug 21, 2021 17:54103,0291,069,427,677504,840,61602,195,456
41Aug 21, 2021 17:54103,0611,067,461,495504,999,90702,195,456
42Oct 28, 2021 17:31103,0701,065,601,002505,042,60002,195,456
43Dec 9, 2021 06:59103,0731,066,537,949505,056,25002,195,456
44Oct 28, 2021 17:28103,0731,084,552,492505,057,22502,207,744
45Oct 28, 2021 17:31103,0791,073,901,306505,085,57702,203,648
46Oct 28, 2021 17:28103,0811,073,647,322505,095,95302,195,456
47Oct 28, 2021 17:31103,0961,064,630,807505,170,20302,195,456
48Dec 9, 2021 06:59103,1561,060,238,174505,464,61302,191,360