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 listJun 6, 2021 23:02Yuriy LyfenkoYuriy LyfenkoScore: 136,376Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 6, 2021 23:03131,6371,170,899,934644,020,0001,000,0002,506,752
2Jun 6, 2021 23:02131,9351,172,453,751644,482,0001,998,0002,506,752
3Jun 6, 2021 23:02132,4011,175,138,208647,768,000999,0002,506,752
4Jun 6, 2021 23:03132,6261,176,863,121648,868,000999,0002,514,944
5Jun 6, 2021 23:02133,3661,179,581,152651,495,0001,998,0002,371,584
6Jun 6, 2021 23:03133,4091,181,487,182652,707,000999,0002,506,752
7Jun 6, 2021 23:02133,4391,182,254,583652,852,000999,0002,514,944
8Jun 6, 2021 23:02133,6911,187,773,874654,088,0001,000,0002,260,992
9Jun 6, 2021 23:03133,6971,177,406,365654,116,0001,000,0002,506,752
10Jun 6, 2021 23:02134,2991,184,404,005658,065,00002,514,944
11Jun 6, 2021 23:02134,5211,181,103,327658,152,0001,000,0002,506,752
12Jun 6, 2021 23:02134,9271,187,110,769661,140,00002,510,848
13Jun 6, 2021 23:03135,0301,185,228,196659,648,0001,998,0002,514,944
14Jun 6, 2021 23:03135,4751,193,196,474660,827,0002,999,0002,506,752
15Jun 6, 2021 23:02135,5351,187,280,405663,123,0001,000,0002,367,488
16Jun 6, 2021 23:02136,0571,192,263,903665,678,000999,0002,506,752
17Jun 6, 2021 23:02136,2871,198,510,487666,808,000999,0002,510,848
18Jun 6, 2021 23:03136,2921,194,673,449666,834,000999,0002,510,848
19Jun 6, 2021 23:03136,3761,198,088,201667,244,000998,0002,494,464
20Jun 6, 2021 23:02136,6241,200,149,121668,459,000999,0002,506,752
21Jun 6, 2021 23:02136,6821,194,754,751668,742,000999,0002,506,752
22Jun 6, 2021 23:02138,0501,206,073,372675,448,000999,0002,514,944
23Jun 6, 2021 23:02138,4601,202,877,363676,454,0001,998,0002,498,560
24Jun 6, 2021 23:03138,9651,211,793,774678,928,0001,999,0002,510,848
25Jun 6, 2021 23:02139,3551,210,251,740680,842,0001,999,0002,506,752
26Jun 6, 2021 23:02140,7661,220,563,049687,753,0001,999,0002,506,752
27Jun 6, 2021 23:02145,2421,238,680,071710,687,000999,0002,510,848
28Jun 6, 2021 23:03149,2271,298,955,045731,213,57002,224,128
29Jun 6, 2021 23:02149,3511,297,509,924731,818,18502,228,224
30Jun 6, 2021 23:02149,6061,294,082,840733,069,03302,224,128
31Jun 6, 2021 23:02149,9971,301,957,848734,985,71302,224,128
32Jun 6, 2021 23:03150,1891,310,266,755735,926,95002,228,224
33Jun 6, 2021 23:02150,4181,296,461,396737,048,52402,224,128
34Jun 6, 2021 23:02151,4991,299,900,803742,342,93202,224,128
35Jun 6, 2021 23:02151,6891,319,826,710743,276,76402,220,032
36Jun 6, 2021 23:03154,1691,316,818,933755,428,58602,220,032