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 11:05Hal FHal FScore: 57,527Success
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 11:0656,116334,382,964274,966,19802,277,376
2Apr 27, 2024 10:5656,122334,571,283275,000,02602,277,376
3Apr 27, 2024 11:0556,126340,738,299275,015,45302,273,280
4Apr 27, 2024 11:0656,136334,883,823275,064,06102,281,472
5Apr 27, 2024 10:5656,155351,446,696275,161,80802,408,448
6Apr 27, 2024 11:0556,270357,129,157275,722,04902,277,376
7Apr 27, 2024 11:0556,281345,514,211275,776,16702,281,472
8Apr 27, 2024 11:0556,302335,108,813275,879,59502,289,664
9Apr 27, 2024 11:0656,477362,558,412276,739,13302,273,280
10Apr 27, 2024 11:0557,144307,056,850277,005,0003,000,0002,523,136
11Apr 27, 2024 10:5657,154302,099,719277,057,0003,000,0002,289,664
12Apr 27, 2024 10:5657,155302,487,066277,061,0003,000,0002,289,664
13Apr 27, 2024 10:5657,179305,920,312279,178,0001,000,0002,289,664
14Apr 27, 2024 11:0657,192304,197,226278,239,0002,001,0002,265,088
15Apr 27, 2024 11:0657,195304,381,041277,255,0003,002,0002,523,136
16Apr 27, 2024 11:0557,201304,092,248277,280,0003,003,0002,519,040
17Apr 27, 2024 10:5657,205310,777,042278,302,0002,002,0002,527,232
18Apr 27, 2024 11:0557,282304,879,781279,683,000998,0002,289,664
19Apr 27, 2024 11:0557,284309,041,996277,696,0002,996,0002,383,872
20Apr 27, 2024 11:0557,301306,594,979278,775,0001,998,0002,269,184
21Apr 27, 2024 11:0557,322310,528,182278,878,0001,999,0002,265,088
22Apr 27, 2024 11:0657,327309,985,678277,903,0002,998,0002,289,664
23Apr 27, 2024 10:5657,329307,775,803278,911,0001,999,0002,289,664
24Apr 27, 2024 11:0557,359310,094,474279,057,0002,000,0002,289,664
25Apr 27, 2024 11:0557,527306,477,577278,886,0002,998,0002,527,232
26Apr 27, 2024 11:0557,688309,419,721279,677,0002,996,0002,289,664
27Apr 27, 2024 11:0557,710310,579,011280,783,0001,998,0002,531,328
28Apr 27, 2024 11:0657,719308,940,182279,825,0002,998,0002,289,664
29Apr 27, 2024 11:0557,722305,916,502280,840,0001,998,0002,289,664
30Apr 27, 2024 11:0657,724310,089,171279,848,0002,998,0002,289,664
31Apr 27, 2024 11:0557,732306,727,979279,891,0002,998,0002,289,664
32Apr 27, 2024 11:0557,737306,490,858279,912,0002,999,0002,289,664
33Apr 27, 2024 11:0657,747304,277,864279,960,0002,999,0002,269,184
34Apr 27, 2024 11:0657,758308,357,974280,015,0003,000,0002,273,280
35Apr 27, 2024 11:0657,830309,186,218282,365,0001,001,0002,531,328
36Apr 27, 2024 11:0557,860318,662,647282,513,0001,001,0002,289,664
37Apr 27, 2024 10:5657,863311,134,255280,533,0002,995,0002,379,776
38Apr 27, 2024 10:5657,875313,139,955281,590,0001,997,0002,289,664
39Apr 27, 2024 10:5657,900312,014,218281,712,0001,997,0002,269,184
40Apr 27, 2024 11:0557,970312,479,425281,051,0003,000,0002,289,664
41Apr 27, 2024 11:0558,002309,450,676281,209,0003,002,0002,375,680
42Apr 27, 2024 10:5658,023311,716,357281,319,0002,992,0002,523,136
43Apr 27, 2024 11:0658,097318,979,959282,679,0001,997,0002,289,664
44Apr 27, 2024 11:0559,569322,468,671288,889,0002,998,0002,523,136
45Apr 27, 2024 11:0560,616321,712,781294,019,0003,000,0002,289,664
46Apr 27, 2024 11:0563,586382,127,266311,570,80202,273,280
47Apr 27, 2024 11:0571,293408,943,589349,334,36302,273,280
48Apr 27, 2024 10:5696,427534,961,770472,492,06802,285,568