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:16matsuoka-601matsuoka-601Score: 56,367Success
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:1152,117322,155,279255,373,45402,244,608
2Jun 15, 2024 05:1652,120314,097,570255,389,26002,248,704
3Jun 15, 2024 05:1052,135318,425,106255,463,41202,236,416
4Jun 15, 2024 05:1652,137327,884,698255,470,68102,244,608
5Jun 15, 2024 05:1552,209323,265,761255,823,56102,240,512
6Jun 15, 2024 05:1152,236329,200,651255,956,49202,375,680
7Jun 15, 2024 05:1152,266338,983,440256,100,97702,367,488
8Jun 15, 2024 05:1152,294322,147,463256,240,73002,236,416
9Jun 15, 2024 05:1652,391325,909,696256,715,79002,244,608
10Jun 15, 2024 05:1152,765317,987,590258,546,73002,244,608
11Jun 15, 2024 05:1553,508323,760,054262,187,53702,244,608
12Jun 15, 2024 05:1553,786328,233,477263,553,49602,244,608
13Jun 15, 2024 05:1054,208331,171,096265,617,23402,256,896
14Jun 15, 2024 05:1154,230322,928,998265,725,59302,240,512
15Jun 15, 2024 05:1054,319330,149,910266,161,89802,252,800
16Jun 15, 2024 05:1656,340301,612,388273,065,0003,000,0002,506,752
17Jun 15, 2024 05:1156,340303,988,928274,065,0002,000,0002,281,472
18Jun 15, 2024 05:1056,342300,494,764274,075,0002,000,0002,506,752
19Jun 15, 2024 05:1056,343301,144,863274,080,0002,000,0002,293,760
20Jun 15, 2024 05:1556,343300,463,078273,080,0003,000,0002,506,752
21Jun 15, 2024 05:1156,346305,842,675273,095,0003,001,0002,498,560
22Jun 15, 2024 05:1156,346301,540,794273,093,0003,001,0002,285,568
23Jun 15, 2024 05:1156,348304,995,721273,106,0003,001,0002,281,472
24Jun 15, 2024 05:1056,351299,329,304273,118,0003,001,0002,506,752
25Jun 15, 2024 05:1156,352302,994,822273,123,0003,001,0002,281,472
26Jun 15, 2024 05:1056,355304,396,318273,138,0003,001,0002,289,664
27Jun 15, 2024 05:1056,356309,411,388273,144,0003,001,0002,289,664
28Jun 15, 2024 05:1056,358298,785,552273,152,0003,001,0002,289,664
29Jun 15, 2024 05:1156,360303,483,360273,163,0003,001,0002,519,040
30Jun 15, 2024 05:1656,362297,352,701274,171,0002,001,0002,498,560
31Jun 15, 2024 05:1556,367301,363,112274,199,0002,001,0002,490,368
32Jun 15, 2024 05:1156,369300,146,717273,204,0003,002,0002,498,560
33Jun 15, 2024 05:1156,370299,370,868274,211,0002,001,0002,330,624
34Jun 15, 2024 05:1156,371298,826,596273,218,0003,002,0002,281,472
35Jun 15, 2024 05:1156,372304,249,586273,223,0003,002,0002,510,848
36Jun 15, 2024 05:1056,372303,086,481274,224,0002,001,0002,514,944
37Jun 15, 2024 05:1056,374302,600,354273,230,0003,002,0002,498,560
38Jun 15, 2024 05:1156,376301,154,094275,244,0001,000,0002,281,472
39Jun 15, 2024 05:1556,379301,710,861273,255,0003,002,0002,494,464
40Jun 15, 2024 05:1556,384298,163,114274,278,0002,002,0002,330,624
41Jun 15, 2024 05:1656,387301,110,663273,292,0003,003,0002,490,368
42Jun 15, 2024 05:1156,390299,139,221274,308,0002,002,0002,281,472
43Jun 15, 2024 05:1556,391299,600,652273,315,0003,003,0002,494,464
44Jun 15, 2024 05:1556,399304,877,344274,355,0002,002,0002,281,472
45Jun 15, 2024 05:1656,407303,983,799274,393,0002,002,0002,498,560
46Jun 15, 2024 05:1156,415301,217,888276,435,00002,510,848
47Jun 15, 2024 05:1156,818301,445,180277,408,0001,001,0002,281,472
48Jun 15, 2024 05:1657,083312,576,786277,709,0001,997,0002,281,472
49Jun 15, 2024 05:1557,158302,600,509277,072,0003,000,0002,281,472
50Jun 15, 2024 05:1157,206302,891,557278,307,0002,002,0002,502,656
51Jun 15, 2024 05:1657,231307,766,767278,431,0002,003,0002,285,568
52Jun 15, 2024 05:1157,847313,367,193281,445,0002,003,0002,289,664
53Jun 15, 2024 05:1657,911312,742,873280,765,0002,997,0002,281,472
54Jun 15, 2024 05:1157,925307,986,478280,834,0002,998,0002,289,664
55Jun 15, 2024 05:1657,940306,903,893280,909,0002,999,0002,293,760
56Jun 15, 2024 05:1557,964312,652,418282,025,0002,000,0002,281,472
57Jun 15, 2024 05:1057,984307,045,328281,120,0003,001,0002,281,472
58Jun 15, 2024 05:1658,080314,974,221284,591,00002,281,472
59Jun 15, 2024 05:1558,504312,588,398284,674,0001,997,0002,289,664
60Jun 15, 2024 05:1158,509315,426,763283,698,0002,996,0002,281,472