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 listJul 21, 2025 13:56zielajzielajScore: 28,462Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 21, 2025 13:5628,453162,059,254139,422,00002,301,952
2Jul 21, 2025 13:5628,459166,275,928139,451,00002,318,336
3Jul 21, 2025 13:5628,460164,484,409138,452,0001,003,0002,306,048
4Jul 21, 2025 13:5628,461170,694,114139,458,00002,445,312
5Jul 21, 2025 13:5628,462165,827,916138,461,0001,003,0002,326,528
6Jul 21, 2025 13:5628,462165,745,224138,461,0001,003,0002,334,720
7Jul 21, 2025 13:5628,467167,439,488138,485,0001,003,0002,326,528
8Jul 21, 2025 13:5628,523161,748,864136,768,0002,994,0002,322,432
9Jul 21, 2025 13:5628,537171,589,880137,833,0001,997,0002,445,312