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 12, 2025 20:55Павел РатмановПавел РатмановScore: 2,929,664Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 12, 2025 20:552,922,39014,356,459,37514,187,780,000131,932,0002,285,568
2Jun 12, 2025 20:552,923,37614,357,308,39814,195,612,000128,932,0002,285,568
3Jun 12, 2025 20:552,923,38814,357,882,27814,196,668,000127,933,0002,277,376
4Jun 12, 2025 20:552,926,93214,375,894,18714,217,018,000124,947,0002,269,184
5Jun 12, 2025 20:552,929,66414,384,295,34614,227,415,000127,940,0002,277,376
6Jun 12, 2025 20:552,930,39014,387,870,03314,198,989,000159,921,0002,277,376
7Jun 12, 2025 20:552,939,17814,432,595,67014,275,032,000126,938,0002,285,568
8Jun 12, 2025 20:552,941,19614,448,655,81714,272,929,000138,931,0002,277,376
9Jun 12, 2025 20:552,952,35314,496,130,05214,338,599,000127,933,0002,277,376