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 listApr 17, 2026 20:06Charles CabergsCharles CabergsScore: 270,645Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 17, 2026 20:06270,4401,349,764,4421,320,161,0004,996,0002,482,176
2Apr 17, 2026 20:06270,5091,350,675,4631,324,497,000999,0002,277,376
3Apr 17, 2026 20:06270,5171,353,521,3721,323,532,0001,999,0002,277,376
4Apr 17, 2026 20:06270,5431,350,772,1771,322,664,0002,999,0002,387,968
5Apr 17, 2026 20:06270,6451,353,934,1351,323,162,0002,998,0002,277,376
6Apr 17, 2026 20:06270,7201,350,915,9151,322,531,0003,998,0002,387,968
7Apr 17, 2026 20:06271,1401,358,312,8701,325,588,0002,999,0002,383,872
8Apr 17, 2026 20:06271,1651,354,860,8341,325,709,0002,999,0002,478,080
9Apr 17, 2026 20:06271,2411,357,260,4011,327,081,0001,998,0002,387,968