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 16, 2021 07:29Dmitry DolgopolovDmitry DolgopolovScore: 495,010Success
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:13462,0992,341,724,6782,264,285,92402,256,896
2May 16, 2021 07:16462,5952,331,178,6832,266,717,31802,260,992
3May 16, 2021 07:29462,5992,331,413,8342,266,733,45002,260,992
4May 16, 2021 07:16462,6052,334,539,0152,266,766,55402,256,896
5May 20, 2021 05:18462,6192,358,156,8222,266,832,39302,252,800
6May 20, 2021 05:13462,6242,332,986,2672,266,855,85002,252,800
7May 20, 2021 05:18462,6322,351,273,5902,266,898,86902,260,992
8May 20, 2021 05:13462,6422,327,230,8252,266,946,16202,240,512
9May 16, 2021 07:16462,6462,333,290,0792,266,965,96902,256,896
10May 16, 2021 07:16462,6532,340,148,1472,266,999,49302,256,896
11May 16, 2021 07:29462,6542,340,246,8192,267,006,26902,248,704
12May 16, 2021 07:29462,6552,340,906,0142,267,010,89502,244,608
13May 20, 2021 05:18462,6832,326,940,3852,267,148,95302,260,992
14May 16, 2021 07:16462,7032,357,214,8772,267,244,18802,248,704
15May 16, 2021 07:16462,7312,342,518,7382,267,382,54202,248,704
16May 16, 2021 07:16495,0102,497,283,4302,425,547,14602,256,896
17May 16, 2021 07:29495,4142,489,109,0092,427,528,45402,260,992
18May 20, 2021 05:13495,4142,491,656,0982,427,530,50102,256,896
19May 20, 2021 05:18495,4152,501,246,3162,427,533,81202,260,992
20May 20, 2021 05:13495,4362,497,244,9952,427,638,51802,256,896
21May 16, 2021 07:16495,4772,489,836,2292,427,835,60702,248,704
22May 16, 2021 07:16495,4942,495,996,2202,427,921,02102,252,800
23May 16, 2021 07:16495,5032,498,120,6172,427,963,60502,256,896
24May 20, 2021 05:18495,5092,488,896,3062,427,992,72502,256,896
25May 16, 2021 07:16495,5092,494,746,2462,427,992,10902,265,088
26May 16, 2021 07:29495,5182,497,594,3872,428,037,84702,248,704
27May 20, 2021 05:18495,5192,496,349,2392,428,042,82602,256,896
28May 16, 2021 07:16495,5212,493,433,7752,428,051,78602,265,088
29May 16, 2021 07:29495,5462,488,481,8522,428,177,27502,260,992
30May 20, 2021 05:13495,5722,490,094,2402,428,303,58902,252,800