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 listJul 21, 2022 15:08Robert BurkeRobert BurkeScore: 81,649Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 21, 2022 15:0878,015437,673,514382,272,43302,285,568
2Jul 21, 2022 15:0878,017437,903,229382,282,42802,285,568
3Jul 21, 2022 08:0178,022432,264,022382,309,74802,289,664
4Jul 21, 2022 08:0178,066444,072,926382,522,68102,281,472
5Jul 21, 2022 15:0878,081447,318,046382,595,81002,285,568
6Jul 21, 2022 08:0178,095447,230,121382,665,04902,293,760
7Jul 21, 2022 15:0881,617429,422,751398,925,000999,0002,514,944
8Jul 21, 2022 08:0181,623423,733,469398,956,000999,0002,281,472
9Jul 21, 2022 08:0181,623423,807,451398,953,000999,0002,437,120
10Jul 21, 2022 08:0181,626422,244,591397,969,0001,999,0002,281,472
11Jul 21, 2022 15:0881,639425,304,408399,032,0001,000,0002,428,928
12Jul 21, 2022 08:0181,646425,643,057399,065,0001,000,0002,281,472
13Jul 21, 2022 08:0181,649421,231,903399,082,0001,000,0002,281,472
14Jul 21, 2022 15:0881,667421,008,775400,169,00002,281,472
15Jul 21, 2022 08:0181,674422,772,949400,204,00002,428,928
16Jul 21, 2022 15:0881,674430,334,533400,203,00002,281,472
17Jul 21, 2022 15:0881,681435,134,022399,239,0001,000,0002,424,832
18Jul 21, 2022 08:0181,682425,668,618398,245,0001,996,0002,281,472
19Jul 21, 2022 15:0881,704422,953,473400,351,00002,281,472
20Jul 21, 2022 08:0181,730430,641,981398,478,0001,997,0002,433,024
21Jul 21, 2022 15:0881,770421,556,187398,673,0001,998,0002,428,928
22Jul 21, 2022 15:0881,770425,010,109398,674,0001,998,0002,424,832
23Jul 21, 2022 15:0881,833427,134,080399,983,000999,0002,281,472
24Jul 21, 2022 08:01102,024518,805,441498,921,000999,0002,281,472