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 23, 2025 03:53Josu San MartinJosu San MartinScore: 178,699Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 23, 2025 03:53170,876864,445,831831,297,0005,994,0002,355,200
2Dec 23, 2025 03:53171,448870,266,286835,097,0005,000,0002,289,664
3Dec 23, 2025 03:53171,576871,224,938834,726,0005,998,0002,293,760
4Dec 23, 2025 03:53176,389892,895,166857,311,0006,994,0002,318,336
5Dec 23, 2025 03:53178,699901,211,781870,626,0004,997,0002,277,376
6Dec 23, 2025 03:53178,795908,096,313870,101,0005,993,0002,502,656
7Dec 23, 2025 03:53179,951910,109,270876,766,0004,992,0002,281,472
8Dec 23, 2025 03:53183,275928,838,527891,055,0006,992,0002,293,760
9Dec 23, 2025 03:53183,442927,494,093892,872,0005,992,0002,306,048