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 listJun 15, 2024 04:51matsuoka-601matsuoka-601Score: 56,334Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 15, 2024 04:5152,339332,372,057256,463,37502,269,184
2Jun 15, 2024 04:5152,518322,777,218257,337,70202,281,472
3Jun 15, 2024 04:5154,047319,859,409264,828,85002,285,568
4Jun 15, 2024 04:5156,257304,181,805272,661,0002,996,0002,293,760
5Jun 15, 2024 04:5156,265304,570,991273,701,0001,997,0002,293,760
6Jun 15, 2024 04:5156,265302,825,643273,702,0001,997,0002,420,736
7Jun 15, 2024 04:5156,334298,851,276273,039,0003,000,0002,433,024
8Jun 15, 2024 04:5157,702309,429,633279,744,0002,997,0002,293,760
9Jun 15, 2024 04:5158,611315,197,283285,194,0002,001,0002,420,736
10Jun 15, 2024 04:5158,619306,765,611284,231,0003,002,0002,293,760
11Jun 15, 2024 04:5158,621308,405,129285,242,0002,001,0002,420,736
12Jun 15, 2024 04:5166,584348,893,461324,259,0002,001,0002,293,760