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 24, 2025 11:49zielajzielajScore: 26,924Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 24, 2025 11:4926,911156,325,523130,865,000998,0002,322,432
2Jul 24, 2025 11:4926,912159,123,067128,874,0002,997,0002,326,528
3Jul 24, 2025 11:4926,920154,697,353129,908,0001,998,0002,465,792
4Jul 24, 2025 11:4926,922161,376,053129,920,0001,998,0002,318,336
5Jul 24, 2025 11:4926,924157,167,032130,927,000999,0002,453,504
6Jul 24, 2025 11:4926,930153,428,301130,960,000999,0002,457,600
7Jul 24, 2025 11:4927,080161,275,968131,695,000997,0002,457,600
8Jul 24, 2025 11:4928,577163,447,412139,029,0001,000,0002,338,816
9Jul 24, 2025 11:4928,867165,470,921139,441,0002,006,0002,461,696