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 14, 2024 06:08matsuoka-601matsuoka-601Score: 54,821Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 14, 2024 06:0854,424296,007,949263,684,0002,996,0002,293,760
2Jun 14, 2024 06:0854,425294,943,101264,684,0001,997,0002,482,176
3Jun 14, 2024 06:0854,427300,704,578263,695,0002,996,0002,433,024
4Jun 14, 2024 06:0954,435289,745,982263,734,0002,996,0002,420,736
5Jun 14, 2024 06:0954,440290,617,344263,760,0002,997,0002,420,736
6Jun 14, 2024 06:0854,451291,720,793264,814,0001,998,0002,289,664
7Jun 14, 2024 06:0954,455294,049,901263,831,0002,998,0002,416,640
8Jun 14, 2024 06:0854,469290,997,557263,899,0002,998,0002,428,928
9Jun 14, 2024 06:0854,484290,002,268263,975,0002,999,0002,293,760
10Jun 14, 2024 06:0854,718293,238,588265,117,0003,001,0002,293,760
11Jun 14, 2024 06:0854,721296,140,123267,131,0001,000,0002,293,760
12Jun 14, 2024 06:0854,731287,374,455266,181,0002,001,0002,416,640
13Jun 14, 2024 06:0954,749289,741,888266,270,0002,002,0002,420,736
14Jun 14, 2024 06:0854,759291,650,465267,319,0001,001,0002,424,832
15Jun 14, 2024 06:0954,777297,385,809266,404,0002,003,0002,437,120
16Jun 14, 2024 06:0854,777290,842,338266,402,0002,003,0002,416,640
17Jun 14, 2024 06:0954,786296,130,275266,447,0002,003,0002,416,640
18Jun 14, 2024 06:0854,793299,369,707266,484,0002,003,0002,293,760
19Jun 14, 2024 06:0954,821296,787,077266,624,0001,997,0002,424,832
20Jun 14, 2024 06:0854,825295,547,369265,647,0002,996,0002,293,760
21Jun 14, 2024 06:0854,843298,928,369265,734,0002,997,0002,293,760
22Jun 14, 2024 06:0854,847295,705,674265,751,0002,997,0002,293,760
23Jun 14, 2024 06:0954,852299,304,878265,776,0002,997,0002,293,760
24Jun 14, 2024 06:0955,534338,903,547272,114,72202,289,664
25Jun 14, 2024 06:0955,554333,064,586272,213,83502,273,280
26Jun 14, 2024 06:0855,556339,039,936272,223,22902,277,376
27Jun 14, 2024 06:0955,565345,088,854272,266,89202,277,376
28Jun 14, 2024 06:0855,642347,890,597272,647,75602,281,472
29Jun 14, 2024 06:0855,682335,275,204272,844,00902,281,472
30Jun 14, 2024 06:0855,701296,426,002269,938,0002,999,0002,293,760
31Jun 14, 2024 06:0856,082355,373,495274,800,54702,260,992
32Jun 14, 2024 06:0856,107350,857,437274,923,57402,277,376
33Jun 14, 2024 06:0856,158306,559,602272,172,0003,001,0002,293,760
34Jun 14, 2024 06:0857,149373,133,874280,030,87302,281,472
35Jun 14, 2024 06:0960,159317,605,749291,783,0002,997,0002,416,640
36Jun 14, 2024 06:0868,047366,055,619330,435,0002,994,0002,293,760