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 listJan 11, 2025 13:16Advait IyerAdvait IyerScore: 718,528Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 11, 2025 11:37718,3793,548,858,0603,517,058,0002,998,0002,297,856
2Jan 11, 2025 13:16718,4213,557,546,8733,518,263,0001,999,0002,289,664
3Jan 11, 2025 11:37718,4793,548,883,9763,517,550,0002,997,0002,289,664
4Jan 11, 2025 13:16718,4813,549,068,6833,517,561,0002,997,0002,297,856
5Jan 11, 2025 13:16718,4863,553,757,4633,517,585,0002,997,0002,506,752
6Jan 11, 2025 11:37718,4873,551,142,2113,516,591,0003,997,0002,297,856
7Jan 11, 2025 11:37718,4993,554,459,3203,517,646,0002,997,0002,506,752
8Jan 11, 2025 13:16718,5213,554,297,0063,517,756,0002,998,0002,297,856
9Jan 11, 2025 11:37718,5253,551,159,7773,517,776,0002,998,0002,289,664
10Jan 11, 2025 11:37718,5283,546,001,8243,517,791,0002,998,0002,289,664
11Jan 11, 2025 11:37718,5343,547,924,0673,517,821,0002,998,0002,502,656
12Jan 11, 2025 13:16718,5433,550,594,6443,517,863,0002,998,0002,293,760
13Jan 11, 2025 11:37718,5683,553,394,8973,516,989,0003,996,0002,297,856
14Jan 11, 2025 11:37718,5823,551,300,1993,518,054,0002,998,0002,510,848
15Jan 11, 2025 13:16718,6063,555,492,0093,519,170,0001,998,0002,289,664
16Jan 11, 2025 13:16718,6933,551,376,9423,518,597,0002,997,0002,289,664
17Jan 11, 2025 13:16718,7763,555,933,8513,519,005,0002,998,0002,289,664
18Jan 11, 2025 13:16718,9013,549,730,1373,517,618,0004,996,0002,297,856