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 listMay 24, 2021 09:19alex3dalex3dScore: 590,594Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 24, 2021 09:19522,6972,625,327,0112,561,216,26102,277,376
2May 24, 2021 09:28522,7082,627,617,2002,561,269,92702,269,184
3May 24, 2021 09:28522,8242,619,790,0312,561,836,76202,281,472
4May 24, 2021 09:28522,8792,636,304,7302,562,104,81202,273,280
5May 24, 2021 09:19523,0052,642,381,2132,562,722,08302,269,184
6May 24, 2021 09:19523,1082,627,069,6802,563,226,85802,277,376
7May 24, 2021 09:19590,5942,955,778,6932,893,912,80602,273,280
8May 24, 2021 09:19597,7682,990,506,2322,929,065,54702,273,280
9May 24, 2021 09:19597,9432,980,879,1962,929,920,00002,277,376
10May 24, 2021 09:28598,1763,001,475,4172,931,062,88302,277,376
11May 24, 2021 09:28598,3222,989,864,3502,931,777,08502,260,992
12May 24, 2021 09:28598,3982,991,297,7072,932,151,70802,277,376