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 listApr 22, 2025 16:21KeefeKeefeScore: 239,663Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2025 16:18239,5341,205,652,6061,172,716,000999,0002,269,184
2Apr 22, 2025 16:18239,6121,205,072,0391,171,100,0002,997,0002,269,184
3Apr 22, 2025 16:18239,6371,198,036,5721,171,224,0002,998,0002,363,392
4Apr 22, 2025 16:18239,6381,200,351,1001,169,230,0004,996,0002,269,184
5Apr 22, 2025 16:18239,6401,198,720,0111,173,239,000999,0002,269,184
6Apr 22, 2025 16:21239,6411,198,185,6101,169,244,0004,996,0002,367,488
7Apr 22, 2025 16:18239,6631,203,911,0271,174,351,00002,269,184
8Apr 22, 2025 16:18239,6691,197,857,9041,172,378,0001,998,0002,269,184
9Apr 22, 2025 16:21239,6691,209,724,3031,171,382,0002,998,0002,359,296
10Apr 22, 2025 16:21239,7171,206,832,6341,171,619,0002,996,0002,363,392
11Apr 22, 2025 16:18239,7281,199,654,0341,173,670,000999,0002,269,184
12Apr 22, 2025 16:18239,7341,202,869,1881,172,698,0001,999,0002,269,184