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 20, 2021 05:15Dmitry DolgopolovDmitry DolgopolovScore: 502,591Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 20, 2021 05:15458,3592,303,617,2152,245,959,48802,252,800
2May 3, 2021 21:24458,3852,316,993,4822,246,085,96902,252,800
3May 20, 2021 05:15458,3932,309,296,2182,246,125,17602,252,800
4May 3, 2021 21:24458,4182,310,500,2282,246,247,74002,252,800
5May 20, 2021 05:15458,4212,305,647,8642,246,262,59502,256,896
6May 3, 2021 21:24458,4272,310,183,4902,246,294,72802,240,512
7May 20, 2021 05:15458,4992,311,353,9042,246,646,89102,252,800
8May 20, 2021 05:15458,5522,314,190,5882,246,904,98302,252,800
9May 20, 2021 05:15458,6142,321,532,2822,247,208,83102,256,896
10May 20, 2021 05:15502,5912,538,308,5242,462,694,57502,260,992
11May 3, 2021 21:24502,6612,533,698,3782,463,036,79502,256,896
12May 20, 2021 05:15502,7272,526,724,8522,463,361,78202,252,800
13May 3, 2021 21:24502,7572,527,145,0752,463,507,87502,248,704
14May 20, 2021 05:15502,7702,525,996,9252,463,571,87802,248,704
15May 20, 2021 05:15502,7792,531,486,8522,463,618,04802,256,896
16May 20, 2021 05:15502,7882,540,361,1842,463,662,87802,252,800
17May 3, 2021 21:24502,8092,530,405,6872,463,764,14102,260,992
18May 20, 2021 05:15502,9022,522,088,5802,464,222,21202,248,704