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 listMar 8, 2026 17:02Josu San MartinJosu San MartinScore: 83,539Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 8, 2026 17:0283,513431,888,249407,214,0002,001,0002,396,160
2Mar 8, 2026 17:0283,519435,601,509407,242,0002,001,0002,396,160
3Mar 8, 2026 17:0283,522436,662,569408,260,0001,000,0002,269,184
4Mar 8, 2026 17:0283,538431,599,981408,334,0001,000,0002,269,184
5Mar 8, 2026 17:0283,539437,132,916408,340,0001,000,0002,269,184
6Mar 8, 2026 17:0283,549437,565,741407,395,0001,997,0002,273,280
7Mar 8, 2026 17:0283,549434,980,805409,392,00002,269,184
8Mar 8, 2026 17:0283,580436,720,265407,547,0001,997,0002,269,184
9Mar 8, 2026 17:0283,581435,169,252406,552,0002,996,0002,392,064