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 listAug 1, 2022 09:44Robert BurkeRobert BurkeScore: 62,187Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 1, 2022 09:4459,798345,776,296293,009,43002,174,976
2Aug 1, 2022 09:4459,816352,450,605293,097,91202,187,264
3Aug 1, 2022 09:4459,892347,115,764293,472,45902,183,168
4Aug 1, 2022 09:4462,167332,627,578302,622,0001,997,0002,445,312
5Aug 1, 2022 09:4462,171331,671,696303,641,000998,0002,445,312
6Aug 1, 2022 09:4462,180328,068,275302,687,0001,997,0002,437,120
7Aug 1, 2022 09:4462,187329,625,411302,720,0001,998,0002,281,472
8Aug 1, 2022 09:4462,188327,921,862302,725,0001,998,0002,445,312
9Aug 1, 2022 09:4462,193327,569,064302,749,0001,998,0002,453,504
10Aug 1, 2022 09:4462,339335,998,129304,459,0001,001,0002,441,216
11Aug 1, 2022 09:4462,584329,982,530304,666,0001,997,0002,445,312
12Aug 1, 2022 09:4462,979332,067,611306,599,0001,997,0002,445,312