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 5, 2024 04:07matsuoka-601matsuoka-601Score: 52,753Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2024 04:0852,485282,373,100255,174,0002,001,0002,318,336
2Sep 5, 2024 04:0852,488276,431,470256,189,0001,000,0002,322,432
3Sep 5, 2024 04:0852,490283,708,455255,198,0002,001,0002,330,624
4Sep 5, 2024 04:0752,495282,273,960256,225,0001,000,0002,281,472
5Sep 5, 2024 04:1152,535284,685,060256,420,0001,001,0002,281,472
6Sep 5, 2024 04:0852,548282,950,048256,485,0001,001,0002,330,624
7Sep 5, 2024 04:0852,555284,980,290256,519,0001,002,0002,281,472
8Sep 5, 2024 04:1152,556284,148,424256,522,0001,002,0002,326,528
9Sep 5, 2024 04:1152,558283,918,885256,532,0001,002,0002,281,472
10Sep 5, 2024 04:0852,590282,547,581256,693,000998,0002,277,376
11Sep 5, 2024 04:1152,753288,114,711257,490,0001,001,0002,330,624
12Sep 5, 2024 04:0852,805282,631,012256,745,0001,998,0002,334,720
13Sep 5, 2024 04:0852,818283,066,549256,810,0001,998,0002,330,624
14Sep 5, 2024 04:1152,822283,932,569256,830,0001,998,0002,281,472
15Sep 5, 2024 04:1153,030281,661,578257,851,0001,998,0002,326,528
16Sep 5, 2024 04:1153,360286,927,135260,461,0001,001,0002,281,472
17Sep 5, 2024 04:0753,469281,420,510260,999,000999,0002,281,472
18Sep 5, 2024 04:0753,889287,937,121262,057,0002,000,0002,330,624
19Sep 5, 2024 04:1153,898293,455,212262,100,0002,000,0002,281,472
20Sep 5, 2024 04:1154,034286,112,700262,768,0001,998,0002,281,472
21Sep 5, 2024 04:0854,779295,799,112267,415,0001,001,0002,424,832