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 15, 2025 13:36zielajzielajScore: 37,814Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2025 13:3637,566205,829,509182,071,0002,000,0002,441,216
2Jul 15, 2025 13:3637,568207,975,034183,081,0001,000,0002,445,312
3Jul 15, 2025 13:3637,570205,467,060183,091,0001,000,0002,322,432
4Jul 15, 2025 13:3637,654207,635,740182,512,0001,994,0002,523,136
5Jul 15, 2025 13:3637,814205,765,278184,289,0001,001,0002,453,504
6Jul 15, 2025 13:3638,450215,700,050188,404,00002,469,888
7Jul 15, 2025 13:3638,455212,397,222188,430,00002,322,432
8Jul 15, 2025 13:3638,464214,064,997188,472,00002,461,696
9Jul 15, 2025 13:3638,465217,651,462188,477,00002,326,528