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 listApr 22, 2025 16:39KeefeKeefeScore: 154,396Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2025 16:39153,758783,713,500753,416,00002,404,352
2Apr 22, 2025 16:40153,772781,681,062752,483,000999,0002,433,024
3Apr 22, 2025 16:40153,846779,299,481751,845,0001,999,0002,416,640
4Apr 22, 2025 16:40154,135785,381,896755,260,00002,408,448
5Apr 22, 2025 16:40154,190779,533,220753,533,0001,998,0002,265,088
6Apr 22, 2025 16:39154,224778,440,763751,702,0003,998,0002,408,448
7Apr 22, 2025 16:39154,229778,671,132752,725,0002,998,0002,408,448
8Apr 22, 2025 16:39154,265778,491,013752,901,0002,999,0002,269,184
9Apr 22, 2025 16:40154,274781,096,106753,942,0001,999,0002,269,184
10Apr 22, 2025 16:40154,396784,023,574751,544,0004,996,0002,416,640
11Apr 22, 2025 16:39154,511779,681,943756,102,0001,000,0002,269,184
12Apr 22, 2025 16:39154,598783,085,605753,533,0003,997,0002,400,256
13Apr 22, 2025 16:39156,083785,681,262762,807,0001,999,0002,269,184
14Apr 22, 2025 16:40156,163792,310,582765,199,00002,408,448
15Apr 22, 2025 16:40156,281789,224,948763,779,0001,999,0002,408,448
16Apr 22, 2025 16:39156,287791,596,060763,806,0001,999,0002,269,184
17Apr 22, 2025 16:40156,437795,750,505762,544,0003,997,0002,420,736
18Apr 22, 2025 16:39156,775790,982,456766,198,0002,000,0002,269,184