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 listNov 6, 2025 10:18izotoffizotoffScore: 2,480,154Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 6, 2025 10:182,475,71812,171,096,02211,993,120,000137,897,0002,478,080
2Nov 6, 2025 10:182,476,52612,173,432,64111,997,105,000137,874,0002,420,736
3Nov 6, 2025 10:182,477,18912,175,343,47711,978,343,000159,884,0002,322,432
4Nov 6, 2025 10:182,477,58612,182,666,45611,996,289,000143,883,0002,404,352
5Nov 6, 2025 10:182,480,15412,191,725,80312,005,880,000146,876,0002,285,568
6Nov 6, 2025 10:182,480,33412,190,655,20512,010,746,000142,889,0002,371,584
7Nov 6, 2025 10:182,489,71212,238,421,29812,036,700,000162,887,0002,306,048
8Nov 6, 2025 10:182,491,89012,246,574,29912,049,376,000160,884,0002,404,352
9Nov 6, 2025 10:182,497,31512,272,123,14912,062,019,000174,826,0002,379,776