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 listAug 13, 2022 04:52Yuriy LyfenkoYuriy LyfenkoScore: 92,580Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 24, 2022 14:2992,383481,924,110451,678,000999,0002,265,088
2Jul 24, 2022 14:2992,409483,815,231450,806,0001,999,0002,347,008
3Jul 24, 2022 14:2992,414476,710,697451,832,000999,0002,342,912
4Jul 24, 2022 14:2992,431484,438,946450,915,0001,999,0002,265,088
5Jul 24, 2022 14:2992,434480,712,025451,926,000999,0002,338,816
6Jul 24, 2022 14:2992,445483,870,697450,980,0001,999,0002,527,232
7Jul 24, 2022 14:2992,455480,524,893452,029,0001,000,0002,342,912
8Aug 13, 2022 04:5292,463477,366,767453,071,00002,338,816
9Aug 13, 2022 04:5292,480472,280,388451,150,0002,000,0002,527,232
10Aug 13, 2022 04:5292,518480,046,968452,340,000998,0002,265,088
11Aug 13, 2022 04:5292,523478,275,555452,362,0001,000,0002,265,088
12Aug 13, 2022 04:5292,542479,206,560452,457,0001,001,0002,265,088
13Jul 24, 2022 14:2992,580476,639,417452,643,000999,0002,461,696
14Aug 13, 2022 04:5292,584489,210,432451,663,0001,998,0002,265,088
15Aug 13, 2022 04:5292,591482,620,633451,696,0001,998,0002,334,720
16Aug 13, 2022 04:5292,620485,023,128451,837,0001,999,0002,330,624
17Jul 24, 2022 14:2992,621477,040,519453,842,00002,265,088
18Aug 13, 2022 04:5292,625482,177,426452,864,000999,0002,338,816
19Jul 24, 2022 14:2993,742530,031,608459,337,35002,195,456
20Aug 13, 2022 04:5293,769524,858,380459,467,98002,207,744
21Jul 24, 2022 14:2993,865533,019,204459,936,48502,203,648
22Aug 13, 2022 04:5293,874532,479,018459,984,26502,203,648
23Jul 24, 2022 14:2993,889539,256,827460,054,08902,207,744
24Aug 13, 2022 04:5294,337531,373,151462,249,41202,240,512