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 15:09Hal FHal FScore: 56,259Success
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 15:0153,614343,850,541262,708,05002,285,568
2Apr 27, 2024 15:0953,632335,892,732262,798,57302,273,280
3Apr 27, 2024 15:0953,705334,692,581263,152,67602,269,184
4Apr 27, 2024 15:0153,736321,799,280263,306,06302,273,280
5Apr 27, 2024 15:0153,953323,213,964264,367,54102,285,568
6Apr 27, 2024 15:0954,026330,710,660264,726,68602,285,568
7Apr 27, 2024 15:0956,190303,060,028272,329,0003,003,0002,289,664
8Apr 27, 2024 15:0156,210301,442,335273,425,0002,003,0002,379,776
9Apr 27, 2024 15:0956,213301,807,413273,447,0001,995,0002,289,664
10Apr 27, 2024 15:0956,216311,132,917273,457,0002,003,0002,289,664
11Apr 27, 2024 15:0156,220302,208,948273,477,0002,003,0002,289,664
12Apr 27, 2024 15:0156,254302,351,175272,651,0002,996,0002,289,664
13Apr 27, 2024 15:0156,259304,884,912273,674,0001,997,0002,289,664
14Apr 27, 2024 15:0156,302297,587,779274,882,000999,0002,523,136
15Apr 27, 2024 15:0956,476302,362,412274,734,0001,998,0002,289,664
16Apr 27, 2024 15:0957,029307,115,220278,442,0001,001,0002,289,664
17Apr 27, 2024 15:0957,031306,422,247277,448,0002,003,0002,289,664
18Apr 27, 2024 15:0957,043304,349,969277,515,0001,996,0002,375,680
19Apr 27, 2024 15:0957,043306,980,350277,510,0002,003,0002,531,328
20Apr 27, 2024 15:0157,063301,250,411276,616,0002,995,0002,289,664
21Apr 27, 2024 15:0157,079306,038,272276,692,0002,996,0002,531,328
22Apr 27, 2024 15:0957,080310,346,032276,694,0002,996,0002,289,664
23Apr 27, 2024 15:0157,520302,190,771278,852,0002,998,0002,285,568
24Apr 27, 2024 15:0160,278321,708,532293,362,0002,002,0002,523,136