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 11, 2025 20:14Daniel NeumannDaniel NeumannScore: 3,757,324Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2025 20:143,754,43118,431,514,26418,283,764,000112,949,0002,281,472
2Jun 11, 2025 20:143,755,22018,435,510,35518,271,638,000128,940,0002,281,472
3Jun 11, 2025 20:143,755,78018,432,226,45118,277,377,000125,947,0002,281,472
4Jun 11, 2025 20:143,755,85618,441,486,57518,279,758,000123,937,0002,281,472
5Jun 11, 2025 20:143,757,32418,446,896,20518,287,957,000122,932,0002,285,568
6Jun 11, 2025 20:143,762,78218,473,594,72118,308,691,000128,941,0002,359,296
7Jun 11, 2025 20:143,815,21918,729,097,99518,558,637,000135,938,0002,281,472
8Jun 11, 2025 20:143,954,65119,420,778,12119,258,852,000118,937,0002,285,568
9Jun 11, 2025 20:144,098,16320,113,855,76419,963,053,000117,947,0002,281,472