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 07:03Yuriy LyfenkoYuriy LyfenkoScore: 116,622Success
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 07:01113,3741,084,499,424553,536,0001,998,0002,506,752
2Jul 2, 2021 07:01113,7941,083,936,150555,594,0001,998,0002,510,848
3Jul 2, 2021 07:01114,0881,085,611,420557,033,0002,000,0002,523,136
4Jul 2, 2021 07:03114,1141,085,050,877557,162,0001,996,0002,506,752
5Jul 2, 2021 07:03114,2001,092,557,819557,581,0001,998,0002,506,752
6Jul 2, 2021 07:02114,3941,089,625,511559,533,000999,0002,514,944
7Jul 2, 2021 07:02114,4171,091,580,150559,644,000999,0002,371,584
8Jul 2, 2021 07:03114,5111,088,493,574560,105,0001,000,0002,510,848
9Jul 2, 2021 07:03114,9721,091,731,031562,363,000998,0002,510,848
10Jul 2, 2021 07:03114,9751,092,375,989561,379,0001,997,0002,506,752
11Jul 2, 2021 07:02114,9761,088,641,659562,385,000998,0002,506,752
12Jul 2, 2021 07:02115,1811,088,864,357562,392,0001,997,0002,506,752
13Jul 2, 2021 07:03115,4491,094,237,562563,700,0001,998,0002,379,776
14Jul 2, 2021 07:03115,6941,095,073,616566,899,00002,510,848
15Jul 2, 2021 07:02115,7181,098,174,112566,016,0001,000,0002,510,848
16Jul 2, 2021 07:02115,8601,093,764,404566,713,000999,0002,506,752
17Jul 2, 2021 07:03115,8891,092,940,094565,859,0001,999,0002,506,752
18Jul 2, 2021 07:03115,9081,093,814,986566,952,000999,0002,260,992
19Jul 2, 2021 07:01115,9341,094,434,298568,077,00002,510,848
20Jul 2, 2021 07:01116,0241,099,620,731566,522,0001,998,0002,506,752
21Jul 2, 2021 07:02116,1411,097,058,219568,090,0001,000,0002,506,752
22Jul 2, 2021 07:03116,1711,100,524,573569,236,00002,506,752
23Jul 2, 2021 07:01116,1831,095,372,602568,299,0001,000,0002,506,752
24Jul 2, 2021 07:02116,5621,100,639,037571,153,00002,514,944
25Jul 2, 2021 07:02116,6221,094,193,274569,451,0001,998,0002,514,944
26Jul 2, 2021 07:03116,7121,093,787,821569,888,0001,999,0002,367,488
27Jul 2, 2021 07:03116,8421,098,681,639571,528,000999,0002,514,944
28Jul 2, 2021 07:03116,8811,108,518,382570,717,0001,999,0002,506,752
29Jul 2, 2021 07:01117,3731,100,595,344575,127,00002,510,848
30Jul 2, 2021 07:03117,4301,104,613,896575,407,00002,506,752
31Jul 2, 2021 07:01117,6531,101,469,090575,501,000999,0002,510,848
32Jul 2, 2021 07:03117,7381,100,651,356574,919,0001,999,0002,379,776
33Jul 2, 2021 07:03117,9081,106,757,249576,750,000999,0002,510,848
34Jul 2, 2021 07:03118,4831,109,395,711578,570,0001,998,0002,510,848
35Jul 2, 2021 07:01119,6111,113,240,119585,098,000998,0002,510,848
36Jul 2, 2021 07:03121,9911,124,485,565596,758,000999,0002,367,488
37Jul 2, 2021 07:03129,7941,218,407,325635,989,70502,240,512
38Jul 2, 2021 07:03129,8531,212,020,155636,278,07602,224,128
39Jul 2, 2021 07:03130,0071,191,516,355637,033,11202,224,128
40Jul 2, 2021 07:03130,2021,195,421,927637,989,42202,228,224
41Jul 2, 2021 07:03130,7271,217,841,139640,561,82402,224,128
42Jul 2, 2021 07:02130,9341,201,566,255641,578,06602,224,128
43Jul 2, 2021 07:01131,0991,210,847,990642,387,22502,224,128
44Jul 2, 2021 07:02131,5871,236,771,339644,775,74302,244,608
45Jul 2, 2021 07:01131,7731,201,002,461645,686,60402,224,128
46Jul 2, 2021 07:01132,0661,233,014,780647,121,12802,232,320
47Jul 2, 2021 07:02133,3851,203,851,732653,587,58902,244,608
48Jul 2, 2021 07:03135,4041,233,739,164663,478,02402,240,512