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 19, 2021 19:27Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Apr 20, 2026 23:41zielaj333.29RecheckSolution Broken
Apr 20, 2026 14:42wn333.29RecheckSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 23:4101,480,640,18712,227,0002,037,0002,359,296expected "560373344798 ", got "-1749309749 "
2Apr 20, 2026 23:410636,506,96811,432,0002,858,0002,506,752expected "560380800065 ", got "649598146 "
3Apr 20, 2026 23:4101,234,541,74510,485,0003,813,0002,506,752expected "560380132270 ", got "691711398 "
4May 19, 2021 19:272,976842,946,31014,581,23102,248,704
5May 19, 2021 19:272,995407,359,59714,673,57502,256,896
6May 19, 2021 19:282,9961,446,550,57014,679,55002,252,800
7May 19, 2021 19:282,9992,040,944,09214,694,40202,252,800
8May 19, 2021 19:273,0181,027,991,51114,789,93802,248,704
9May 19, 2021 19:283,023545,280,71114,810,63702,256,896