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 listJun 12, 2024 08:20matsuoka-601matsuoka-601Score: 59,224Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 12, 2024 08:2058,646307,744,711285,362,0002,002,0002,416,640
2Jun 12, 2024 08:2058,661317,767,782285,434,0002,003,0002,416,640
3Jun 12, 2024 08:2058,750310,621,470284,877,0002,998,0002,420,736
4Jun 12, 2024 08:2059,116318,983,578287,673,0001,997,0002,416,640
5Jun 12, 2024 08:2059,157316,417,079286,871,0002,998,0002,293,760
6Jun 12, 2024 08:2059,194311,663,553288,051,0002,000,0002,293,760
7Jun 12, 2024 08:2059,224312,700,251288,198,0002,001,0002,420,736
8Jun 12, 2024 08:2059,338316,816,276287,758,0002,997,0002,416,640
9Jun 12, 2024 08:2060,139324,847,547291,685,0002,996,0002,420,736
10Jun 12, 2024 08:2061,144372,774,124299,606,68402,281,472
11Jun 12, 2024 08:2061,662370,832,727302,146,08602,281,472
12Jun 12, 2024 08:2061,827369,502,769302,954,42402,281,472