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 19, 2025 01:54zielajzielajScore: 32,747Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 19, 2025 01:5432,581189,948,911157,650,0001,995,0002,322,432
2Jul 19, 2025 01:5432,585188,611,532159,667,00002,457,600
3Jul 19, 2025 01:5432,603182,637,109158,755,000998,0002,297,856
4Jul 19, 2025 01:5432,615183,225,158157,817,0001,997,0002,457,600
5Jul 19, 2025 01:5432,747182,914,544159,459,0001,002,0002,445,312
6Jul 19, 2025 01:5432,934185,122,552160,373,0001,002,0002,457,600
7Jul 19, 2025 01:5433,016184,068,205160,778,000998,0002,461,696
8Jul 19, 2025 01:5433,200190,779,930161,680,000998,0002,322,432
9Jul 19, 2025 01:5448,077263,139,545235,578,00002,457,600