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 12, 2025 21:12Павел РатмановПавел РатмановScore: 2,511,254Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 12, 2025 21:122,501,62512,289,697,86812,131,024,000126,937,0002,277,376
2Jun 12, 2025 21:122,502,44112,293,765,42912,129,040,000132,923,0002,269,184
3Jun 12, 2025 21:122,502,76712,292,331,64812,137,616,000125,944,0002,285,568
4Jun 12, 2025 21:122,509,60712,324,189,70712,156,140,000140,932,0002,277,376
5Jun 12, 2025 21:122,511,25412,334,413,38112,167,221,000137,923,0002,277,376
6Jun 12, 2025 21:122,511,39412,338,307,37912,168,921,000136,909,0002,277,376
7Jun 12, 2025 21:122,512,11912,338,673,93912,155,465,000153,917,0002,277,376
8Jun 12, 2025 21:122,526,97412,412,002,24912,282,221,00099,952,0002,277,376
9Jun 12, 2025 21:122,559,95312,575,776,36412,410,835,000132,933,0002,277,376