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 listJun 25, 2026 12:53Victor MerckléVictor MerckléScore: 51,224Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 25, 2026 12:5451,176258,408,473248,662,0002,101,0002,117,632stderr
2Jun 25, 2026 12:5451,183258,425,265248,721,0002,076,0002,117,632stderr
3Jun 25, 2026 12:5451,192258,566,606248,703,0002,140,0002,117,632stderr
4Jun 25, 2026 12:5451,223258,685,724248,928,0002,067,0002,117,632stderr
5Jun 25, 2026 12:5451,224258,743,550248,880,0002,121,0002,117,632stderr
6Jun 25, 2026 12:5451,237258,770,587248,968,0002,095,0002,117,632stderr
7Jun 25, 2026 12:5451,240258,808,130249,026,0002,052,0002,117,632stderr
8Jun 25, 2026 12:5451,255258,966,084249,007,0002,146,0002,117,632stderr
9Jun 25, 2026 12:5451,660260,832,775251,046,0002,091,0002,117,632stderr