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 listDec 22, 2025 02:55Josu San MartinJosu San MartinScore: 827,305Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 22, 2025 02:53826,7924,075,593,2434,050,281,000999,0002,289,664
2Dec 22, 2025 02:53826,9244,076,358,9124,049,932,0001,998,0002,281,472
3Dec 22, 2025 02:55826,9414,077,943,5404,050,014,0001,999,0002,285,568
4Dec 22, 2025 02:53827,0684,082,083,1634,051,635,000999,0002,285,568
5Dec 22, 2025 02:53827,1414,078,137,6904,051,994,000999,0002,351,104
6Dec 22, 2025 02:53827,2114,087,699,0784,052,333,000999,0002,289,664
7Dec 22, 2025 02:53827,3054,081,925,9844,051,798,0001,998,0002,281,472
8Dec 22, 2025 02:53827,4824,085,288,5584,053,664,000999,0002,289,664
9Dec 22, 2025 02:53827,4964,089,647,9444,053,731,000999,0002,289,664
10Dec 22, 2025 02:55827,5034,086,508,0874,053,764,000999,0002,281,472
11Dec 22, 2025 02:53827,5384,082,701,3334,052,940,0001,998,0002,281,472
12Dec 22, 2025 02:55827,6554,092,501,7774,053,512,0001,998,0002,289,664