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 6, 2025 15:23izotoffizotoffScore: 2,424,161Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 6, 2025 15:232,415,54311,874,467,46511,665,289,000170,872,0002,465,792
2Nov 6, 2025 15:232,415,77711,874,639,50511,646,446,000190,859,0002,371,584
3Nov 6, 2025 15:232,416,51511,874,862,11211,667,088,000173,837,0002,449,408
4Nov 6, 2025 15:232,422,15011,906,600,62511,695,686,000172,847,0002,527,232
5Nov 6, 2025 15:232,424,16111,911,382,65611,686,559,000191,828,0002,306,048
6Nov 6, 2025 15:232,456,11812,073,127,16711,803,150,000231,826,0002,539,520
7Nov 6, 2025 15:232,471,66412,149,650,87311,899,307,000211,845,0002,469,888
8Nov 6, 2025 15:232,481,82312,199,121,46611,934,158,000226,774,0002,342,912
9Nov 6, 2025 15:232,504,98312,310,702,23612,051,574,000222,844,0002,334,720