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 listMay 23, 2021 15:54Yuriy LyfenkoYuriy LyfenkoScore: 186,368Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 23, 2021 15:59178,944942,345,892876,826,99002,236,416
2May 23, 2021 15:57180,780951,875,590885,822,78802,236,416
3May 23, 2021 15:54181,442961,108,002889,067,33602,240,512
4May 23, 2021 15:54181,636943,651,148890,015,53302,232,320
5May 23, 2021 15:54182,896956,839,561896,189,23002,228,224
6May 23, 2021 15:54185,299969,183,700907,967,04502,236,416
7May 23, 2021 16:06185,628963,750,713909,575,78002,232,320
8May 23, 2021 15:59186,368973,783,298913,202,86002,240,512
9May 23, 2021 15:59186,597968,552,949914,325,02302,228,224
10May 23, 2021 15:57187,700983,132,476919,729,51802,244,608
11May 23, 2021 15:57188,431987,798,929923,311,85802,236,416
12May 23, 2021 15:54189,901988,398,831930,516,71502,232,320
13May 23, 2021 15:54191,6821,005,468,726939,243,50402,240,512
14May 23, 2021 16:06192,0701,010,017,059941,145,05602,240,512
15May 23, 2021 16:06192,9281,007,312,172945,346,24602,236,416