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 24, 2021 14:54Yuriy LyfenkoYuriy LyfenkoScore: 210,917Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 17, 2021 18:17203,3571,076,304,925996,448,93702,195,456
2May 24, 2021 14:54204,7951,070,351,8591,003,496,37402,187,264
3May 24, 2021 14:54205,4261,061,096,9421,006,588,32602,183,168
4May 24, 2021 16:16206,0311,073,199,6501,009,551,47102,179,072
5May 24, 2021 16:16208,6881,079,222,6171,022,571,37802,199,552
6Jun 17, 2021 18:17210,8021,088,165,4511,032,928,21902,191,360
7May 24, 2021 16:16210,9171,096,174,2321,033,495,60002,195,456
8Jun 17, 2021 18:17211,4141,105,307,6491,035,928,32402,199,552
9May 24, 2021 14:54211,4771,095,096,4301,036,235,55002,191,360
10May 24, 2021 14:54213,4221,099,919,7801,045,766,13102,203,648
11May 24, 2021 14:54213,9321,107,517,8951,048,268,09502,199,552
12May 24, 2021 14:54222,1601,157,393,1701,088,584,41502,191,360