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 19, 2025 21:28Daniel NeumannDaniel NeumannScore: 1,018,027Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 19, 2025 21:281,017,8425,013,720,5094,984,426,0002,998,0002,273,280
2Jun 19, 2025 21:281,017,8535,016,647,3814,984,483,0002,998,0002,277,376
3Jun 19, 2025 21:281,018,0065,021,910,5454,986,228,0001,999,0002,285,568
4Jun 19, 2025 21:281,018,0115,027,422,5844,986,255,0001,998,0002,277,376
5Jun 19, 2025 21:281,018,0275,015,758,4574,987,334,000999,0002,285,568
6Jun 19, 2025 21:281,018,0675,015,155,3494,985,528,0002,998,0002,260,992
7Jun 19, 2025 21:281,018,2045,020,765,6034,985,205,0003,996,0002,277,376
8Jun 19, 2025 21:281,018,4585,024,943,4574,987,446,0002,998,0002,269,184
9Jun 19, 2025 21:281,043,0035,139,141,7455,109,714,000999,0002,277,376