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 11:23Hal FHal FScore: 60,822Success
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 11:2360,249366,798,013295,218,08402,269,184
2Apr 27, 2024 11:2460,504353,123,575296,471,92002,281,472
3Apr 27, 2024 11:2360,627324,260,149295,070,0002,000,0002,527,232
4Apr 27, 2024 11:2360,661323,031,585296,240,0001,000,0002,289,664
5Apr 27, 2024 11:2460,663319,278,199295,246,0002,001,0002,289,664
6Apr 27, 2024 11:2460,665319,338,970294,257,0003,002,0002,281,472
7Apr 27, 2024 11:2360,676328,407,121296,312,0001,001,0002,285,568
8Apr 27, 2024 11:2460,708332,077,964297,471,00002,289,664
9Apr 27, 2024 11:2360,776325,782,439294,806,0002,998,0002,265,088
10Apr 27, 2024 11:2460,802323,072,888294,931,0002,999,0002,273,280
11Apr 27, 2024 11:2460,804357,871,738297,940,82202,277,376
12Apr 27, 2024 11:2460,815323,999,598294,995,0002,999,0002,269,184
13Apr 27, 2024 11:2360,822321,130,739295,028,0003,000,0002,289,664
14Apr 27, 2024 11:2460,824321,569,721295,039,0003,000,0002,285,568
15Apr 27, 2024 11:2360,909359,822,550298,455,47802,277,376
16Apr 27, 2024 11:2460,917355,966,352298,491,61702,281,472
17Apr 27, 2024 11:2360,959328,910,550295,701,0002,996,0002,289,664
18Apr 27, 2024 11:2460,978324,192,361296,792,0001,998,0002,265,088
19Apr 27, 2024 11:2361,101322,791,806297,395,0002,002,0002,531,328
20Apr 27, 2024 11:2361,130325,406,353297,535,0002,003,0002,289,664
21Apr 27, 2024 11:2361,416353,576,292300,940,62702,273,280
22Apr 27, 2024 11:2462,095332,100,516301,263,0003,002,0002,289,664
23Apr 27, 2024 11:2362,142330,249,691302,494,0002,003,0002,289,664
24Apr 27, 2024 11:24106,697551,843,923519,819,0002,998,0002,523,136