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 3, 2021 08:59a-poptsova-poptsovScore: 6,292,118Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 3, 2021 08:596,164,48230,271,254,21330,205,963,47102,265,088
2May 3, 2021 08:596,165,26230,287,680,43130,209,785,44102,260,992
3May 3, 2021 08:596,186,82830,392,386,76630,315,455,76102,252,800
4May 3, 2021 08:596,291,76830,893,121,62530,829,664,23202,256,896
5May 3, 2021 08:596,292,11830,913,790,09630,831,379,96702,252,800
6May 3, 2021 08:596,292,52430,897,087,17830,833,368,41802,256,896
7May 3, 2021 08:596,292,61430,892,445,10830,833,810,17002,252,800
8May 3, 2021 08:596,305,02530,963,267,36730,894,622,48302,252,800
9May 3, 2021 08:596,324,62431,068,270,66930,990,659,65002,244,608