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 listSep 21, 2025 05:52Tejas G.Tejas G.Score: 2,873,203Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 21, 2025 05:522,862,26314,060,412,14713,892,173,000132,915,0002,277,376
2Sep 21, 2025 05:522,862,46314,056,951,98313,898,140,000127,927,0002,285,568
3Sep 21, 2025 05:522,862,96614,063,503,93513,888,608,000139,925,0002,277,376
4Sep 21, 2025 05:522,865,30914,074,336,54113,915,088,000124,928,0002,277,376
5Sep 21, 2025 05:522,873,20314,117,918,64713,952,768,000125,925,0002,281,472
6Sep 21, 2025 05:522,874,59114,115,929,45213,917,588,000167,910,0002,277,376
7Sep 21, 2025 05:522,877,33614,131,077,90513,983,015,000115,933,0002,277,376
8Sep 21, 2025 05:522,900,83214,246,419,10814,086,148,000127,928,0002,277,376
9Sep 21, 2025 05:522,924,02914,360,849,34214,201,806,000125,936,0002,277,376