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 listOct 4, 2022 15:38Robert BurkeRobert BurkeScore: 55,374Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 4, 2022 15:3952,920319,581,519259,310,29202,183,168
2Oct 4, 2022 15:3952,922319,279,498259,315,64202,174,976
3Oct 4, 2022 15:3952,931325,403,945259,362,71302,183,168
4Oct 4, 2022 15:3852,947329,261,407259,439,94702,179,072
5Oct 4, 2022 15:3852,967332,933,064259,536,49902,174,976
6Oct 4, 2022 15:4052,967321,810,712259,540,66202,187,264
7Oct 4, 2022 15:3852,980328,991,614259,602,84502,183,168
8Oct 4, 2022 15:4052,983334,813,464259,616,58902,183,168
9Oct 4, 2022 15:4053,467317,608,075261,989,02802,179,072
10Oct 4, 2022 15:3955,347290,885,997270,198,0001,000,0002,441,216
11Oct 4, 2022 15:3855,353294,328,910270,231,0001,000,0002,281,472
12Oct 4, 2022 15:3955,355290,862,365270,240,0001,000,0002,441,216
13Oct 4, 2022 15:4055,361294,451,765270,268,0001,000,0002,441,216
14Oct 4, 2022 15:3955,363293,932,954270,279,0001,001,0002,281,472
15Oct 4, 2022 15:3855,366293,106,163270,290,0001,001,0002,281,472
16Oct 4, 2022 15:4055,368294,421,559270,301,0001,001,0002,281,472
17Oct 4, 2022 15:4055,372291,080,082270,320,0001,001,0002,281,472
18Oct 4, 2022 15:4055,374291,292,914271,331,00002,281,472
19Oct 4, 2022 15:3955,374294,234,109270,331,0001,001,0002,441,216
20Oct 4, 2022 15:3855,375299,063,770270,335,0001,001,0002,281,472
21Oct 4, 2022 15:3855,379297,992,535270,355,0001,001,0002,445,312
22Oct 4, 2022 15:3955,414297,875,780269,535,0001,996,0002,281,472
23Oct 4, 2022 15:4055,444300,182,685269,680,0001,997,0002,281,472
24Oct 4, 2022 15:3855,557295,103,399271,231,0001,000,0002,445,312
25Oct 4, 2022 15:3955,577296,242,667271,327,0001,001,0002,441,216
26Oct 4, 2022 15:3855,723294,009,235271,041,0002,000,0002,281,472
27Oct 4, 2022 15:3855,812300,190,208272,478,0001,001,0002,281,472
28Oct 4, 2022 15:3955,821297,296,986272,521,0001,001,0002,281,472
29Oct 4, 2022 15:3955,829300,845,039271,568,0001,996,0002,281,472
30Oct 4, 2022 15:4055,849305,027,476271,661,0001,997,0002,449,408
31Oct 4, 2022 15:3855,851298,962,855271,674,0001,997,0002,281,472
32Oct 4, 2022 15:4055,862296,294,638271,727,0001,997,0002,441,216
33Oct 4, 2022 15:3955,900301,202,022271,913,0001,999,0002,281,472
34Oct 4, 2022 15:3856,781299,822,149277,228,0001,000,0002,445,312
35Oct 4, 2022 15:40379,71910,112,717,566392,093,0001,468,532,000266,711,040
36Oct 4, 2022 15:40382,15510,136,926,479393,493,0001,479,066,000266,772,480