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 listJul 31, 2026 21:58Josu San MartinJosu San MartinScore: 36,988Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 31, 2026 21:5936,967203,475,218179,985,0001,154,0002,117,632
2Jul 31, 2026 21:5936,972201,062,780180,017,0001,146,0002,117,632
3Jul 31, 2026 21:5936,975199,303,496180,027,0001,151,0002,113,536
4Jul 31, 2026 21:5936,980204,369,475180,061,0001,143,0002,113,536
5Jul 31, 2026 21:5936,988203,135,621180,084,0001,162,0002,117,632
6Jul 31, 2026 21:5936,992202,271,278180,105,0001,158,0002,113,536
7Jul 31, 2026 21:5936,995202,172,751180,127,0001,152,0002,113,536
8Jul 31, 2026 21:5937,047201,607,137180,412,0001,122,0002,113,536
9Jul 31, 2026 21:5938,203207,467,831186,051,0001,147,0002,113,536