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 listJul 2, 2021 07:04Yuriy LyfenkoYuriy LyfenkoScore: 116,449Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 2, 2021 07:04113,779588,055,427556,518,000999,0002,494,464
2Jul 2, 2021 07:04113,906589,046,341556,137,0002,000,0002,265,088
3Jul 2, 2021 07:04113,920587,816,549557,207,0001,000,0002,527,232
4Jul 2, 2021 07:04114,022585,675,978556,711,0001,998,0002,371,584
5Jul 2, 2021 07:04114,285582,545,020559,998,00002,260,992
6Jul 2, 2021 07:04114,428589,303,329558,698,0001,998,0002,371,584
7Jul 2, 2021 07:04114,558589,681,466561,334,00002,379,776
8Jul 2, 2021 07:04114,582589,351,366560,455,000999,0002,527,232
9Jul 2, 2021 07:04114,875599,068,862560,889,0001,999,0002,527,232
10Jul 2, 2021 07:04115,118592,106,951563,080,0001,000,0002,375,680
11Jul 2, 2021 07:04115,125591,239,285564,111,00002,371,584
12Jul 2, 2021 07:04115,189592,065,318563,426,000998,0002,527,232
13Jul 2, 2021 07:04115,303590,484,251563,988,000999,0002,371,584
14Jul 2, 2021 07:04115,330592,157,459563,115,0002,000,0002,523,136
15Jul 2, 2021 07:04115,900591,626,223566,910,000999,0002,265,088
16Jul 2, 2021 07:04115,912593,871,349565,971,0001,999,0002,265,088
17Jul 2, 2021 07:04116,205594,308,437567,406,0001,997,0002,265,088
18Jul 2, 2021 07:04116,293599,519,905567,835,0001,999,0002,265,088
19Jul 2, 2021 07:04116,449604,764,324569,601,000999,0002,375,680
20Jul 2, 2021 07:04116,506595,467,559569,879,000999,0002,265,088
21Jul 2, 2021 07:04116,773600,752,480571,189,0001,000,0002,265,088
22Jul 2, 2021 07:04116,911600,154,724570,865,0001,999,0002,527,232
23Jul 2, 2021 07:04117,906607,770,192575,739,0001,999,0002,367,488
24Jul 2, 2021 07:04118,636608,608,149580,317,0001,000,0002,527,232
25Jul 2, 2021 07:04118,819608,475,946582,211,00002,375,680
26Jul 2, 2021 07:04119,387612,657,461583,997,000999,0002,371,584
27Jul 2, 2021 07:04120,793617,316,765590,887,000999,0002,527,232
28Jul 2, 2021 07:04129,222693,302,475633,185,70402,240,512
29Jul 2, 2021 07:04129,719713,620,078635,623,46002,232,320
30Jul 2, 2021 07:04130,540695,289,458639,646,80602,240,512
31Jul 2, 2021 07:04130,703695,617,144640,442,29402,236,416
32Jul 2, 2021 07:04130,967702,361,294641,739,14202,232,320
33Jul 2, 2021 07:04131,557702,884,117644,628,78202,244,608
34Jul 2, 2021 07:04132,238704,534,617647,965,29202,228,224
35Jul 2, 2021 07:04134,068721,614,665656,932,92402,232,320
36Jul 2, 2021 07:04134,903719,754,588661,026,29702,244,608