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 listOct 4, 2025 19:57AnSaAnSaScore: 270,358Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 4, 2025 19:57270,2941,349,774,0281,322,442,0001,999,0002,285,568
2Oct 4, 2025 19:57270,3041,352,082,3941,321,491,0002,998,0002,277,376
3Oct 4, 2025 19:57270,3351,353,339,9201,322,642,0001,999,0002,277,376
4Oct 4, 2025 19:57270,3461,346,686,8731,322,695,0001,999,0002,277,376
5Oct 4, 2025 19:57270,3581,352,254,4391,321,756,0002,997,0002,285,568
6Oct 4, 2025 19:57270,3741,356,381,9051,321,833,0002,999,0002,285,568
7Oct 4, 2025 19:57270,3961,355,126,8131,321,943,0002,997,0002,285,568
8Oct 4, 2025 19:57270,4151,347,813,7011,322,035,0002,997,0002,273,280
9Oct 4, 2025 19:57270,4701,354,760,7491,322,303,0002,998,0002,269,184