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 listOct 11, 2025 20:29Martin StensgårdMartin StensgårdScore: 2,931,666Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 12, 2025 19:592,923,44214,356,706,40814,199,947,000124,920,0002,277,376
2Oct 11, 2025 20:292,925,93014,370,711,16114,206,131,000130,927,0002,277,376
3Oct 11, 2025 20:292,927,04314,374,037,80414,234,570,000107,943,0002,277,376
4Oct 12, 2025 19:592,930,45114,389,856,20814,160,317,000198,892,0002,277,376
5Oct 11, 2025 20:292,930,85414,400,004,84014,181,295,000179,889,0002,277,376
6Oct 11, 2025 20:292,931,01514,395,399,52414,230,046,000131,926,0002,277,376
7Oct 12, 2025 19:592,931,66614,399,019,64414,214,246,000150,917,0002,277,376
8Oct 11, 2025 20:292,931,68014,397,416,21814,203,332,000161,901,0002,277,376
9Oct 11, 2025 20:292,934,87414,412,452,83914,252,954,000127,927,0002,285,568
10Oct 11, 2025 20:292,938,18114,436,819,37814,268,159,000128,929,0002,285,568
11Oct 11, 2025 20:292,968,61114,587,640,42714,410,276,000135,917,0002,519,040
12Oct 11, 2025 20:293,063,80415,043,311,42214,889,717,000122,923,0002,281,472