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 listJun 12, 2024 08:15matsuoka-601matsuoka-601Score: 61,339Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 12, 2024 08:1560,457320,278,868294,236,0002,001,0002,420,736
2Jun 12, 2024 08:1460,458323,279,887296,246,00002,420,736
3Jun 12, 2024 08:1760,486322,418,248294,381,0002,002,0002,293,760
4Jun 12, 2024 08:1460,487323,051,298294,384,0002,002,0002,293,760
5Jun 12, 2024 08:1760,669325,432,554296,280,0001,000,0002,424,832
6Jun 12, 2024 08:1461,024321,785,052296,017,0003,000,0002,506,752
7Jun 12, 2024 08:1761,230320,894,250297,027,0003,000,0002,293,760
8Jun 12, 2024 08:1461,232326,032,229297,036,0003,000,0002,424,832
9Jun 12, 2024 08:1461,247328,215,696297,111,0003,001,0002,428,928
10Jun 12, 2024 08:1561,248322,521,073297,115,0003,001,0002,412,544
11Jun 12, 2024 08:1761,259325,232,262299,168,0001,000,0002,433,024
12Jun 12, 2024 08:1761,261329,154,730297,177,0003,001,0002,437,120
13Jun 12, 2024 08:1561,262323,326,358297,182,0003,001,0002,420,736
14Jun 12, 2024 08:1461,262321,388,990299,183,0001,000,0002,420,736
15Jun 12, 2024 08:1761,288366,768,412300,310,22202,281,472
16Jun 12, 2024 08:1561,294365,454,715300,341,29302,281,472
17Jun 12, 2024 08:1561,300376,045,795300,371,42102,277,376
18Jun 12, 2024 08:1761,332356,065,867300,525,50602,277,376
19Jun 12, 2024 08:1461,339366,117,303300,561,99302,285,568
20Jun 12, 2024 08:1761,481368,403,987301,258,34302,285,568
21Jun 12, 2024 08:1761,596325,112,773298,824,0002,998,0002,510,848
22Jun 12, 2024 08:1562,032326,890,344300,956,0002,999,0002,293,760
23Jun 12, 2024 08:1762,043326,169,376303,009,0001,000,0002,293,760
24Jun 12, 2024 08:1562,141361,364,611304,490,66702,285,568
25Jun 12, 2024 08:1462,150366,230,445304,533,31602,285,568
26Jun 12, 2024 08:1562,221333,127,115301,887,0002,998,0002,293,760
27Jun 12, 2024 08:1562,245329,043,924302,002,0003,000,0002,293,760
28Jun 12, 2024 08:1562,250328,415,649304,027,0001,000,0002,420,736
29Jun 12, 2024 08:1462,254331,309,723302,045,0003,000,0002,408,448
30Jun 12, 2024 08:1762,258327,825,282302,062,0003,000,0002,424,832
31Jun 12, 2024 08:1462,339372,696,476305,458,84302,273,280
32Jun 12, 2024 08:1562,394331,363,450302,732,0002,997,0002,293,760
33Jun 12, 2024 08:1564,520342,975,639313,147,0003,001,0002,416,640
34Jun 12, 2024 08:1766,666357,667,621323,669,0002,996,0002,293,760
35Jun 12, 2024 08:1467,078361,123,767325,687,0002,997,0002,265,088
36Jun 12, 2024 08:1469,290367,306,740337,519,0002,003,0002,293,760