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 listMay 9, 2026 19:08Josu San MartinJosu San MartinScore: 1,113,416Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:091,112,8185,459,640,3915,451,809,0001,002,0002,441,216
2May 9, 2026 19:091,113,1695,461,283,6895,453,520,0001,009,0002,453,504
3May 9, 2026 19:091,113,2165,461,350,1775,453,759,0001,003,0002,453,504
4May 9, 2026 19:091,113,2605,461,797,6285,453,974,0001,000,0002,453,504
5May 9, 2026 19:091,113,4165,464,977,5985,454,719,0001,022,0002,449,408
6May 9, 2026 19:091,113,4235,464,160,0545,454,763,0001,011,0002,318,336
7May 9, 2026 19:091,113,7565,464,222,9045,454,357,0003,049,0002,457,600
8May 9, 2026 19:091,114,1825,466,460,2765,455,462,0004,032,0002,461,696
9May 9, 2026 19:091,114,2125,466,778,4015,455,362,0004,277,0002,461,696