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 22, 2025 23:56zielajzielajScore: 27,897Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 22, 2025 23:5627,845170,160,077136,442,00002,465,792
2Jul 22, 2025 23:5627,853160,889,887136,479,00002,445,312
3Jul 22, 2025 23:5627,855169,508,246135,486,0001,003,0002,457,600
4Jul 22, 2025 23:5627,894161,079,259132,693,0003,990,0002,453,504
5Jul 22, 2025 23:5627,897162,379,581134,698,0001,995,0002,322,432
6Jul 22, 2025 23:5627,899163,768,925135,710,000997,0002,469,888
7Jul 22, 2025 23:5629,563168,669,280143,860,000999,0002,310,144
8Jul 22, 2025 23:5629,598170,942,408143,032,0002,000,0002,457,600
9Jul 22, 2025 23:5629,903173,554,562145,523,0001,003,0002,318,336