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 31, 2024 04:20matsuoka-601matsuoka-601Score: 56,275Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 31, 2024 04:1952,071313,122,948255,150,18902,269,184
2Jul 31, 2024 04:2052,095324,158,814255,264,14802,281,472
3Jul 31, 2024 04:1952,106325,458,292255,319,62902,265,088
4Jul 31, 2024 04:1952,117317,710,564255,372,85002,265,088
5Jul 31, 2024 04:2052,417317,547,971256,844,23202,265,088
6Jul 31, 2024 04:2054,192328,057,816265,539,69702,273,280
7Jul 31, 2024 04:1956,266299,838,822272,706,0002,996,0002,400,256
8Jul 31, 2024 04:1956,267304,454,168273,713,0001,997,0002,527,232
9Jul 31, 2024 04:1956,268306,912,925273,715,0001,997,0002,392,064
10Jul 31, 2024 04:1956,268302,683,081274,713,000998,0002,269,184
11Jul 31, 2024 04:2056,271302,740,116273,732,0001,998,0002,531,328
12Jul 31, 2024 04:2056,272294,297,408273,733,0001,998,0002,502,656
13Jul 31, 2024 04:1956,275299,724,124273,751,0001,998,0002,531,328
14Jul 31, 2024 04:1956,276299,524,593273,754,0001,998,0002,265,088
15Jul 31, 2024 04:2056,284303,548,759273,795,0001,998,0002,523,136
16Jul 31, 2024 04:2056,292298,441,810273,832,0001,998,0002,396,160
17Jul 31, 2024 04:1956,732305,730,086275,987,0001,999,0002,404,352
18Jul 31, 2024 04:2057,351307,223,611279,022,0002,000,0002,396,160
19Jul 31, 2024 04:1957,463308,111,410280,569,0001,002,0002,523,136
20Jul 31, 2024 04:2057,695310,964,835280,707,0001,997,0002,531,328
21Jul 31, 2024 04:1958,256313,874,757284,453,0001,001,0002,535,424
22Jul 31, 2024 04:2058,370310,530,819285,015,0001,000,0002,400,256
23Jul 31, 2024 04:2058,409310,038,460285,205,0001,000,0002,531,328
24Jul 31, 2024 04:2058,438313,583,253285,346,0001,001,0002,273,280