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 26, 2026 18:46Jasper EdbrookeJasper EdbrookeScore: 277,387Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 26, 2026 18:46274,7351,369,344,1341,238,266,000107,936,0002,502,656
2Mar 26, 2026 18:46274,7671,367,393,0501,245,407,000100,951,0002,289,664
3Mar 26, 2026 18:46274,9011,374,476,8281,248,086,00098,927,0002,289,664
4Mar 26, 2026 18:46275,0491,374,867,1171,232,761,000114,977,0002,281,472
5Mar 26, 2026 18:46277,3871,388,370,8151,264,254,00094,944,0002,510,848
6Mar 26, 2026 18:46277,3991,387,936,9081,292,293,00066,963,0002,502,656
7Mar 26, 2026 18:46277,5881,381,665,5711,282,228,00077,953,0002,498,560
8Mar 26, 2026 18:46277,6281,383,176,3281,184,456,000175,919,0002,281,472
9Mar 26, 2026 18:46277,6631,385,749,2721,146,619,000213,928,0002,506,752