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 16, 2025 00:28zielajzielajScore: 38,542Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 16, 2025 00:2837,369209,349,319182,107,0001,000,0002,314,240
2Jul 16, 2025 00:2837,372204,781,131182,123,0001,000,0002,441,216
3Jul 16, 2025 00:2837,400200,568,436182,260,0001,001,0002,297,856
4Jul 16, 2025 00:2837,699208,777,540182,727,0001,997,0002,297,856
5Jul 16, 2025 00:2838,542211,934,392187,857,000999,0002,314,240
6Jul 16, 2025 00:2838,562212,048,071187,955,000999,0002,461,696
7Jul 16, 2025 00:2852,032279,633,807252,957,0001,999,0002,449,408
8Jul 16, 2025 00:2852,253282,213,554254,038,0002,000,0002,318,336
9Jul 16, 2025 00:2853,595301,507,129261,618,000998,0002,310,144