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 15, 2024 05:18matsuoka-601matsuoka-601Score: 52,975Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 15, 2024 05:1952,205317,717,391255,804,52902,359,296
2Jun 15, 2024 05:1852,208325,659,215255,819,04802,232,320
3Jun 15, 2024 05:1952,217328,851,331255,863,56302,240,512
4Jun 15, 2024 05:1852,219317,697,206255,875,46302,248,704
5Jun 15, 2024 05:1852,267332,952,316256,110,14102,244,608
6Jun 15, 2024 05:1952,740316,825,977258,427,09302,244,608
7Jun 15, 2024 05:1952,936281,909,960257,382,0002,002,0002,281,472
8Jun 15, 2024 05:1952,937281,977,148258,391,0001,001,0002,506,752
9Jun 15, 2024 05:1852,941282,589,055257,410,0002,003,0002,289,664
10Jun 15, 2024 05:1852,943285,057,321258,422,0001,001,0002,486,272
11Jun 15, 2024 05:1952,951286,951,825257,455,0002,003,0002,289,664
12Jun 15, 2024 05:1852,952288,001,736257,462,0002,003,0002,281,472
13Jun 15, 2024 05:1952,953290,873,318257,467,0002,003,0002,490,368
14Jun 15, 2024 05:1852,963286,080,271257,517,0002,004,0002,494,464
15Jun 15, 2024 05:1852,963287,087,344257,515,0002,004,0002,281,472
16Jun 15, 2024 05:1852,964284,654,145256,531,0002,994,0002,281,472
17Jun 15, 2024 05:1852,966291,615,757256,539,0002,994,0002,289,664
18Jun 15, 2024 05:1852,967286,348,192256,544,0002,994,0002,289,664
19Jun 15, 2024 05:1852,975285,587,072257,583,0001,996,0002,502,656
20Jun 15, 2024 05:1853,017285,245,888256,785,0002,997,0002,289,664
21Jun 15, 2024 05:1953,030282,377,168256,851,0002,998,0002,486,272
22Jun 15, 2024 05:1953,046282,492,108256,926,0002,999,0002,285,568
23Jun 15, 2024 05:1853,066281,810,842257,021,0003,000,0002,494,464
24Jun 15, 2024 05:1853,074283,641,625258,064,0002,000,0002,289,664
25Jun 15, 2024 05:1853,484334,443,478262,073,81002,240,512
26Jun 15, 2024 05:1953,864289,874,671261,937,0001,999,0002,289,664
27Jun 15, 2024 05:1853,867287,230,534261,947,0001,999,0002,506,752
28Jun 15, 2024 05:1954,023290,643,193261,719,0002,996,0002,498,560
29Jun 15, 2024 05:1854,341288,381,551263,269,0003,003,0002,281,472
30Jun 15, 2024 05:1854,380323,791,386266,461,61702,252,800
31Jun 15, 2024 05:1854,477296,832,809263,938,0002,999,0002,289,664
32Jun 15, 2024 05:1854,950295,968,712266,254,0003,002,0002,514,944
33Jun 15, 2024 05:1854,975334,042,105269,379,88702,240,512
34Jun 15, 2024 05:1854,989299,593,756267,443,0002,003,0002,289,664
35Jun 15, 2024 05:1855,168295,831,447269,323,0001,001,0002,498,560
36Jun 15, 2024 05:1955,510298,989,814268,999,0002,999,0002,281,472