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 27, 2024 18:17Hal FHal FScore: 56,125Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2024 18:1753,884323,793,479264,031,66102,277,376
2Apr 27, 2024 18:1753,926347,030,846264,235,18702,289,664
3Apr 27, 2024 18:1753,946338,893,550264,337,15902,277,376
4Apr 27, 2024 18:1754,028340,443,827264,737,87702,277,376
5Apr 27, 2024 18:1754,392330,523,780266,522,67202,269,184
6Apr 27, 2024 18:1754,655337,547,197267,807,72102,281,472
7Apr 27, 2024 18:1756,083301,761,340271,809,0002,997,0002,273,280
8Apr 27, 2024 18:1756,093303,227,589271,856,0002,998,0002,289,664
9Apr 27, 2024 18:1756,097301,628,169273,875,000999,0002,527,232
10Apr 27, 2024 18:1756,098298,963,453272,880,0001,999,0002,269,184
11Apr 27, 2024 18:1756,118298,259,772272,981,0001,999,0002,523,136
12Apr 27, 2024 18:1756,120306,116,570273,988,000999,0002,289,664
13Apr 27, 2024 18:1756,125297,595,023272,013,0003,000,0002,260,992
14Apr 27, 2024 18:1756,128299,608,025272,025,0003,000,0002,289,664
15Apr 27, 2024 18:1756,131298,532,160272,040,0003,000,0002,367,488
16Apr 27, 2024 18:1756,137300,004,201272,071,0003,000,0002,265,088
17Apr 27, 2024 18:1756,356298,079,409273,142,0003,001,0002,367,488
18Apr 27, 2024 18:1756,400302,968,319275,357,0001,001,0002,289,664
19Apr 27, 2024 18:1756,609303,122,551276,384,0001,001,0002,289,664
20Apr 27, 2024 18:1756,796300,597,496276,300,0002,002,0002,289,664
21Apr 27, 2024 18:1756,832310,451,468277,474,0001,001,0002,265,088
22Apr 27, 2024 18:1756,946305,281,126277,037,0002,000,0002,523,136
23Apr 27, 2024 18:1762,790332,356,198305,675,0001,997,0002,289,664
24Apr 27, 2024 18:1766,262353,707,001321,687,0002,997,0002,289,664