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 9, 2021 12:37Yuriy LyfenkoYuriy LyfenkoScore: 104,896Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 9, 2021 12:37104,7331,039,515,724512,191,0001,000,0002,478,080
2Jul 9, 2021 12:37104,8301,039,177,153512,668,000999,0002,482,176
3Jul 9, 2021 12:37104,8341,041,777,957511,690,0001,998,0002,260,992
4Jul 9, 2021 12:37104,8371,040,915,744511,705,0001,998,0002,482,176
5Jul 9, 2021 12:37104,8451,101,594,090513,740,48602,203,648
6Jul 9, 2021 12:37104,8601,071,468,421513,812,77502,207,744
7Jul 9, 2021 12:37104,8961,043,021,256512,989,000999,0002,478,080
8Jul 9, 2021 12:37104,9251,072,519,416514,132,98402,191,360
9Jul 9, 2021 12:37104,9381,036,339,452513,198,0001,000,0002,478,080
10Jul 9, 2021 12:37104,9491,042,848,137513,252,0001,000,0002,347,008
11Jul 9, 2021 12:37104,9571,044,015,128514,289,00002,478,080
12Jul 9, 2021 12:37104,9581,041,242,588513,296,000998,0002,260,992