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 19, 2025 21:55Daniel NeumannDaniel NeumannScore: 461,598Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 19, 2025 21:55460,0282,277,665,5072,251,137,0002,998,0002,285,568
2Jun 19, 2025 21:55460,2582,288,355,1722,252,266,0002,997,0002,510,848
3Jun 19, 2025 21:55460,2952,280,794,6682,252,447,0002,997,0002,277,376
4Jun 19, 2025 21:55460,3532,285,338,8012,253,730,0001,998,0002,265,088
5Jun 19, 2025 21:55461,5982,285,545,0982,258,831,0002,998,0002,277,376
6Jun 19, 2025 21:55461,7832,286,515,8562,259,739,0002,998,0002,277,376
7Jun 19, 2025 21:55461,8202,288,618,1592,260,919,0001,999,0002,285,568
8Jun 19, 2025 21:55461,9682,287,454,0062,260,645,0002,998,0002,285,568
9Jun 19, 2025 21:55475,8382,355,480,6972,330,605,000999,0002,260,992