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 listJan 23, 2026 02:54Josu San MartinJosu San MartinScore: 101,951Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 23, 2026 02:54101,882530,011,404496,220,0003,001,0002,281,472
2Jan 23, 2026 02:54101,890533,446,050493,257,0006,003,0002,289,664
3Jan 23, 2026 02:54101,917525,648,985494,389,0005,003,0002,306,048
4Jan 23, 2026 02:54101,949531,597,757493,556,0005,994,0002,281,472
5Jan 23, 2026 02:54101,951524,537,231495,562,0003,996,0002,449,408
6Jan 23, 2026 02:54101,954525,573,502495,578,0003,996,0002,277,376
7Jan 23, 2026 02:54101,979527,116,348495,702,0003,997,0002,326,528
8Jan 23, 2026 02:54102,241533,280,018496,984,0003,999,0002,347,008
9Jan 23, 2026 02:54102,823532,817,028498,835,0004,998,0002,465,792