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 listAug 31, 2024 21:39Yuriy LyfenkoYuriy LyfenkoScore: 92,488Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 31, 2024 21:3892,386482,048,333451,690,000999,0002,265,088
2Aug 31, 2024 21:3892,404479,260,351450,779,0001,999,0002,260,992
3Aug 31, 2024 21:3892,406487,937,269451,789,000999,0002,265,088
4Aug 31, 2024 21:3892,411482,872,000451,815,000999,0002,342,912
5Aug 31, 2024 21:3992,412480,165,456450,820,0001,999,0002,527,232
6Aug 31, 2024 21:3892,414480,888,143451,832,000999,0002,330,624
7Aug 31, 2024 21:3992,420476,783,806450,859,0001,999,0002,256,896
8Aug 31, 2024 21:3892,437477,327,301450,942,0001,999,0002,338,816
9Aug 31, 2024 21:3992,438478,881,273451,948,000999,0002,527,232
10Aug 31, 2024 21:3992,439478,774,381450,953,0001,999,0002,338,816
11Aug 31, 2024 21:3992,445479,726,328451,980,000999,0002,527,232
12Aug 31, 2024 21:3992,464480,135,688452,076,0001,000,0002,260,992
13Aug 31, 2024 21:3892,488478,009,734452,192,0001,000,0002,260,992
14Aug 31, 2024 21:3892,494476,674,695452,220,0001,000,0002,461,696
15Aug 31, 2024 21:3892,501483,269,797451,257,0001,996,0002,527,232
16Aug 31, 2024 21:3992,503473,925,195452,264,0001,000,0002,265,088
17Aug 31, 2024 21:3992,532479,525,611451,411,0001,997,0002,265,088
18Aug 31, 2024 21:3992,564483,323,155451,564,0001,998,0002,265,088
19Aug 31, 2024 21:3892,570479,412,382452,595,000999,0002,260,992
20Aug 31, 2024 21:3992,574479,367,931452,613,000999,0002,265,088
21Aug 31, 2024 21:3892,578485,097,515452,632,000999,0002,527,232
22Aug 31, 2024 21:3992,590482,866,524452,690,0001,001,0002,338,816
23Aug 31, 2024 21:3992,594479,869,245451,713,0001,998,0002,260,992
24Aug 31, 2024 21:3892,594482,801,894451,713,0001,998,0002,265,088