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 07:09Yuriy LyfenkoYuriy LyfenkoScore: 101,870Success
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 07:09101,7401,028,882,643497,529,000999,0002,482,176
2Dec 9, 2021 07:09101,7421,028,268,169498,538,00002,338,816
3Dec 9, 2021 07:09101,7591,025,510,835496,623,0001,998,0002,482,176
4Dec 9, 2021 07:09101,7981,025,944,269496,810,0001,999,0002,478,080
5Dec 9, 2021 07:09101,7991,024,455,536497,816,000999,0002,478,080
6Dec 9, 2021 07:09101,8271,021,567,817497,955,000999,0002,482,176
7Dec 9, 2021 07:09101,8701,026,766,988499,163,00002,486,272
8Dec 9, 2021 07:09101,9111,030,470,815497,367,0001,997,0002,478,080
9Dec 9, 2021 07:09101,9171,028,460,652498,397,000998,0002,478,080
10Dec 9, 2021 07:09102,2731,062,225,517501,136,91902,195,456
11Dec 9, 2021 07:09102,4561,068,576,039502,035,76902,203,648
12Dec 9, 2021 07:09102,4761,071,891,206502,130,91202,191,360