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 21, 2021 19:19Dmitry DolgopolovDmitry DolgopolovScore: 475,780Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 21, 2021 19:23439,4652,224,362,8812,153,380,19002,265,088
2May 21, 2021 19:19439,4812,226,230,8592,153,457,04502,256,896
3May 21, 2021 19:20439,4852,204,068,6672,153,475,87402,260,992
4May 21, 2021 19:23439,4922,205,619,1252,153,508,44502,244,608
5May 21, 2021 19:20439,4982,213,048,6422,153,540,28402,265,088
6May 21, 2021 19:19439,5062,209,736,1482,153,580,77402,256,896
7May 21, 2021 19:23439,5092,225,222,3402,153,593,97702,248,704
8May 21, 2021 19:20439,5292,206,898,4892,153,694,52302,252,800
9May 21, 2021 19:19439,5302,210,359,9622,153,699,03602,256,896
10May 21, 2021 19:20475,7802,394,823,0072,331,322,68802,260,992
11May 21, 2021 19:19475,8172,395,754,9252,331,505,48902,244,608
12May 21, 2021 19:23475,8232,400,759,1902,331,531,54902,256,896
13May 21, 2021 19:23475,8242,408,156,8072,331,535,59402,256,896
14May 21, 2021 19:19475,8292,403,214,1592,331,561,55702,252,800
15May 21, 2021 19:20475,8542,396,903,6922,331,685,89402,248,704
16May 21, 2021 19:23475,8552,389,950,0882,331,690,40402,256,896
17May 21, 2021 19:19475,8712,410,538,4092,331,770,09502,252,800
18May 21, 2021 19:20476,0042,393,709,2812,332,421,25302,248,704