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 listSep 26, 2026 17:56Kevin HeaveyKevin HeaveyScore: 24,103Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 26, 2026 17:5624,086127,489,498116,940,0001,083,00020,480
2Sep 26, 2026 17:5624,092128,449,974116,994,0001,060,00020,480
3Sep 26, 2026 17:5624,099126,964,063117,005,0001,081,00020,480
4Sep 26, 2026 17:5624,100126,950,540117,030,0001,064,00020,480
5Sep 26, 2026 17:5624,103126,995,420117,050,0001,056,00020,480
6Sep 26, 2026 17:5624,105127,022,475116,996,0001,119,00020,480
7Sep 26, 2026 17:5624,106127,533,806117,069,0001,055,00020,480
8Sep 26, 2026 17:5624,139127,242,209117,229,0001,054,00020,480
9Sep 26, 2026 17:5624,140127,188,059117,273,0001,017,00020,480