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 5, 2025 16:21AntonAntonScore: 565,557Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 5, 2025 16:21560,0772,772,861,4752,742,379,0001,998,0002,539,520
2Nov 5, 2025 16:21565,0822,799,013,5922,767,903,000999,0002,297,856
3Nov 5, 2025 16:21565,2872,796,500,4532,767,906,0001,999,0002,285,568
4Nov 5, 2025 16:21565,5312,799,136,2412,769,103,0001,998,0002,297,856
5Nov 5, 2025 16:21565,5572,796,921,1202,768,230,0002,998,0002,301,952
6Nov 5, 2025 16:21567,6262,808,958,3832,777,370,0003,997,0002,539,520
7Nov 5, 2025 16:21567,7142,808,539,5782,779,799,0001,998,0002,539,520
8Nov 5, 2025 16:21567,7602,813,744,4622,780,025,0001,999,0002,523,136
9Nov 5, 2025 16:21567,8802,810,393,0832,780,611,0001,999,0002,285,568