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 13:05Hal FHal FScore: 58,982Success
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 12:5153,889330,206,783264,056,96802,277,376
2Apr 27, 2024 13:0353,897336,899,860264,097,73302,285,568
3Apr 27, 2024 13:0553,989336,631,468264,545,15702,281,472
4Apr 27, 2024 12:5153,997339,582,489264,586,60302,273,280
5Apr 27, 2024 12:5154,001335,634,255264,605,38402,281,472
6Apr 27, 2024 13:0354,025333,336,061264,721,34102,273,280
7Apr 27, 2024 13:0354,035325,489,765264,771,69802,277,376
8Apr 27, 2024 13:0554,050334,211,343264,843,01402,273,280
9Apr 27, 2024 13:0556,164346,913,409275,205,24602,273,280
10Apr 27, 2024 13:0557,491306,908,901278,708,0002,996,0002,281,472
11Apr 27, 2024 13:0558,186309,343,631283,109,0002,000,0002,289,664
12Apr 27, 2024 13:0358,188313,180,865282,119,0003,001,0002,273,280
13Apr 27, 2024 13:0358,210308,414,770282,229,0003,002,0002,273,280
14Apr 27, 2024 13:0358,224308,275,272284,299,0001,001,0002,289,664
15Apr 27, 2024 13:0558,275317,995,830283,544,0002,003,0002,523,136
16Apr 27, 2024 13:0558,286309,234,294282,607,0002,995,0002,355,200
17Apr 27, 2024 12:5158,310307,454,654283,719,0001,998,0002,285,568
18Apr 27, 2024 12:5158,376309,660,587283,043,0003,000,0002,285,568
19Apr 27, 2024 12:5158,381308,623,616283,066,0003,000,0002,285,568
20Apr 27, 2024 13:0558,474342,510,882286,524,72802,281,472
21Apr 27, 2024 12:5158,735312,158,780284,803,0002,997,0002,269,184
22Apr 27, 2024 12:5158,750310,280,283284,877,0002,998,0002,285,568
23Apr 27, 2024 13:0558,823313,177,461286,230,0002,001,0002,531,328
24Apr 27, 2024 13:0358,974311,686,860285,976,0002,999,0002,281,472
25Apr 27, 2024 13:0558,982311,633,145286,011,0003,000,0002,289,664
26Apr 27, 2024 13:0358,988311,633,641286,043,0003,000,0002,289,664
27Apr 27, 2024 13:0558,993313,500,770287,064,0002,000,0002,289,664
28Apr 27, 2024 13:0558,995316,116,669287,074,0002,000,0002,289,664
29Apr 27, 2024 13:0359,014316,667,794286,168,0003,001,0002,289,664
30Apr 27, 2024 13:0559,244313,831,414288,295,0002,002,0002,289,664
31Apr 27, 2024 13:0559,453317,629,772290,318,0001,001,0002,289,664
32Apr 27, 2024 13:0559,489318,694,064290,494,0001,001,0002,527,232
33Apr 27, 2024 13:0559,600320,381,133289,038,0003,000,0002,281,472
34Apr 27, 2024 13:0559,707316,308,181289,569,0002,995,0002,289,664
35Apr 27, 2024 13:0560,290326,142,097293,420,0002,002,0002,531,328
36Apr 27, 2024 12:5160,441324,454,960294,158,0002,001,0002,527,232
37Apr 27, 2024 12:5160,444324,736,145293,173,0003,001,0002,285,568
38Apr 27, 2024 12:5160,543330,415,170296,662,00002,285,568
39Apr 27, 2024 13:0560,635320,541,144295,113,0002,000,0002,531,328
40Apr 27, 2024 13:0360,655330,935,924295,210,0002,001,0002,265,088
41Apr 27, 2024 13:0360,685322,039,721294,353,0003,003,0002,289,664
42Apr 27, 2024 13:0560,776324,231,006294,803,0002,997,0002,289,664
43Apr 27, 2024 13:0562,884336,921,794305,132,0003,001,0002,265,088
44Apr 27, 2024 13:0564,037375,495,977313,781,45802,277,376
45Apr 27, 2024 12:5166,476349,024,746323,736,0001,998,0002,527,232
46Apr 27, 2024 13:0569,745371,413,165338,752,0002,997,0002,289,664
47Apr 27, 2024 13:0382,383435,651,793400,682,0002,997,0002,289,664
48Apr 27, 2024 13:05184,521975,012,718904,153,41102,281,472