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 listNov 5, 2025 19:11Daniel MastalerzDaniel MastalerzScore: 243,569Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 5, 2025 19:11240,5701,202,564,7981,175,796,0002,999,0002,289,664
2Nov 5, 2025 19:11241,9931,210,770,1101,182,765,0002,999,0002,281,472
3Nov 5, 2025 19:11242,5131,217,930,5901,185,315,0002,998,0002,281,472
4Nov 5, 2025 19:11242,7801,221,016,5331,187,624,0001,999,0002,273,280
5Nov 5, 2025 19:11243,5691,215,482,5681,190,489,0002,998,0002,523,136
6Nov 5, 2025 19:11243,7201,225,302,2081,191,228,0002,998,0002,289,664
7Nov 5, 2025 19:11246,4601,232,725,3981,204,657,0002,999,0002,289,664
8Nov 5, 2025 19:11247,0231,233,781,1301,207,417,0002,998,0002,260,992
9Nov 5, 2025 19:11248,7791,244,813,7541,216,019,0002,997,0002,289,664