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 listJul 31, 2024 04:18matsuoka-601matsuoka-601Score: 56,442Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 31, 2024 04:1852,131332,868,536255,441,61202,244,608
2Jul 31, 2024 04:1852,135326,280,352255,461,35202,236,416
3Jul 31, 2024 04:1852,142314,460,487255,494,39802,244,608
4Jul 31, 2024 04:1852,247335,431,400256,011,96402,244,608
5Jul 31, 2024 04:1852,250329,631,136256,024,30702,248,704
6Jul 31, 2024 04:1854,569343,917,613267,385,71202,232,320
7Jul 31, 2024 04:1856,424309,556,790275,479,0001,001,0002,289,664
8Jul 31, 2024 04:1856,425308,943,042274,480,0002,003,0002,281,472
9Jul 31, 2024 04:1856,426301,380,822274,484,0002,003,0002,289,664
10Jul 31, 2024 04:1856,431302,342,482275,510,0001,001,0002,334,720
11Jul 31, 2024 04:1856,432305,483,470274,512,0002,003,0002,289,664
12Jul 31, 2024 04:1856,436306,354,434275,535,0001,001,0002,494,464
13Jul 31, 2024 04:1856,442301,269,255274,562,0002,004,0002,289,664
14Jul 31, 2024 04:1856,450304,730,521274,607,0001,997,0002,281,472
15Jul 31, 2024 04:1856,461303,300,863274,663,0001,997,0002,490,368
16Jul 31, 2024 04:1856,463302,327,873273,671,0002,996,0002,502,656
17Jul 31, 2024 04:1856,487303,095,190273,789,0002,997,0002,285,568
18Jul 31, 2024 04:1856,762302,862,035275,135,0003,001,0002,277,376
19Jul 31, 2024 04:1856,822307,484,300276,425,0002,003,0002,498,560
20Jul 31, 2024 04:1856,844309,927,063276,535,0002,003,0002,502,656
21Jul 31, 2024 04:1856,882303,208,919276,726,0001,998,0002,330,624
22Jul 31, 2024 04:1857,937307,198,935281,893,0001,999,0002,494,464
23Jul 31, 2024 04:1858,305308,307,547282,699,0002,996,0002,285,568
24Jul 31, 2024 04:1858,394307,527,162284,133,0002,000,0002,289,664