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 13:46matsuoka-601matsuoka-601Score: 59,579Success
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 13:4659,192352,117,718290,042,05502,277,376
2Jun 12, 2024 13:4659,204350,482,655290,101,85302,285,568
3Jun 12, 2024 13:4659,218357,230,691290,170,63202,408,448
4Jun 12, 2024 13:4659,481320,048,949290,456,0001,001,0002,420,736
5Jun 12, 2024 13:4659,493319,804,654289,513,0002,003,0002,293,760
6Jun 12, 2024 13:4659,518318,447,984289,641,0001,997,0002,420,736
7Jun 12, 2024 13:4659,579312,977,482288,940,0002,999,0002,293,760
8Jun 12, 2024 13:4659,784318,159,090289,943,0002,999,0002,420,736
9Jun 12, 2024 13:4660,888322,833,239296,351,0002,002,0002,441,216
10Jun 12, 2024 13:4663,227337,094,283307,815,0001,998,0002,293,760
11Jun 12, 2024 13:4663,873341,084,964309,979,0002,999,0002,420,736
12Jun 12, 2024 13:4665,648353,911,024319,678,0001,997,0002,293,760