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 26, 2021 13:46evgenikwtevgenikwtScore: 171,721Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 26, 2021 13:16171,430905,942,158840,008,97202,232,320
2Oct 26, 2021 13:16171,498907,500,139840,338,35002,240,512
3Oct 26, 2021 20:23171,545923,450,481840,572,82702,240,512
4Oct 26, 2021 13:33171,568893,378,290840,683,56502,248,704
5Oct 26, 2021 13:33171,593902,844,075840,804,40302,236,416
6Oct 26, 2021 13:46171,614924,295,119840,906,46502,244,608
7Oct 26, 2021 13:20171,631899,176,148840,992,42502,244,608
8Oct 26, 2021 20:23171,639894,391,738841,029,89102,244,608
9Oct 26, 2021 13:20171,694906,871,803841,300,38602,244,608
10Oct 26, 2021 13:47171,721908,365,768841,431,50102,244,608
11Oct 26, 2021 20:23171,789907,942,398841,768,07702,248,704
12Oct 26, 2021 13:47171,813894,320,129841,884,95302,236,416
13Oct 26, 2021 13:33171,871902,806,011842,167,25002,244,608
14Oct 26, 2021 13:47171,950906,277,413842,555,72002,224,128
15Oct 26, 2021 13:46171,961897,566,816842,610,01102,248,704
16Oct 26, 2021 13:46172,083920,142,508843,208,61802,244,608
17Oct 26, 2021 13:20173,434908,141,471849,827,50902,240,512
18Oct 26, 2021 13:16173,711909,363,092851,181,61802,248,704