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 listNov 10, 2024 08:07E SequeiraE SequeiraScore: 800,607Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 10, 2024 08:07800,2933,952,634,4013,918,439,0002,998,0002,293,760
2Nov 10, 2024 08:07800,4023,956,607,8133,918,974,0002,997,0002,281,472
3Nov 10, 2024 08:07800,4223,951,623,6653,919,069,0002,997,0002,281,472
4Nov 10, 2024 08:07800,4993,947,698,2093,919,449,0002,998,0002,281,472
5Nov 10, 2024 08:07800,6073,953,495,2543,920,977,0001,998,0002,281,472
6Nov 10, 2024 08:07800,6363,948,692,4293,921,116,0001,999,0002,281,472
7Nov 10, 2024 08:07800,6533,952,889,9303,920,204,0002,997,0002,523,136
8Nov 10, 2024 08:07800,7133,952,366,7893,919,496,0003,997,0002,281,472
9Nov 10, 2024 08:07800,8163,955,673,0483,920,998,0002,998,0002,281,472