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 listDec 22, 2025 16:54Josu San MartinJosu San MartinScore: 218,380Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 22, 2025 23:18211,7101,067,794,3791,032,384,0004,997,0002,301,952
2Dec 22, 2025 23:18212,3001,068,352,2521,033,275,0006,995,0002,281,472
3Dec 22, 2025 23:18212,6671,067,985,1601,037,067,0005,000,0002,289,664
4Dec 22, 2025 16:54212,7911,067,584,2321,037,677,0004,998,0002,490,368
5Dec 22, 2025 16:54213,4271,072,590,0361,039,795,0005,998,0002,478,080
6Dec 22, 2025 16:54213,9801,078,764,9371,043,503,0004,997,0002,437,120
7Dec 22, 2025 23:18216,3061,090,446,6511,055,900,0003,999,0002,285,568
8Dec 22, 2025 16:54216,8061,092,068,9481,055,352,0006,995,0002,510,848
9Dec 22, 2025 23:18217,0631,094,826,5661,058,611,0004,998,0002,437,120
10Dec 22, 2025 23:18218,3801,096,377,7191,066,067,0003,996,0002,277,376
11Dec 22, 2025 23:18218,4991,103,317,4021,064,646,0005,998,0002,285,568
12Dec 22, 2025 16:54220,4271,107,394,7361,074,090,0006,000,0002,400,256
13Dec 22, 2025 16:54223,3721,120,203,4401,089,527,0004,997,0002,490,368
14Dec 22, 2025 23:18226,5691,136,411,5141,103,193,0006,994,0002,510,848
15Dec 22, 2025 16:54232,7181,167,032,5681,134,320,0005,996,0002,404,352
16Dec 22, 2025 16:54233,6211,170,648,9941,140,742,0003,999,0002,285,568
17Dec 22, 2025 23:18233,8051,173,934,7671,137,656,0007,990,0002,437,120
18Dec 22, 2025 16:54238,0911,197,037,6881,161,653,0004,994,0002,322,432