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 listJan 12, 2026 06:48Petsku01Petsku01Score: 532,129Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 12, 2026 06:48531,4532,633,325,5132,395,272,000208,849,0002,265,088
2Jan 12, 2026 06:48531,4762,632,705,4712,398,373,000205,860,0002,523,136
3Jan 12, 2026 06:48531,8262,630,687,7302,393,113,000212,832,0002,342,912
4Jan 12, 2026 06:48532,0142,637,169,2782,393,042,000213,825,0002,281,472
5Jan 12, 2026 06:48532,1292,634,010,7332,392,563,000214,871,0002,289,664
6Jan 12, 2026 06:48532,1882,633,021,0902,391,829,000215,894,0002,363,392
7Jan 12, 2026 06:48532,2062,643,410,5712,396,905,000210,903,0002,281,472
8Jan 12, 2026 06:48532,5672,636,152,8072,394,695,000214,882,0002,342,912
9Jan 12, 2026 06:48532,7842,644,656,7922,389,757,000220,885,0002,281,472