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 listMay 2, 2024 20:05Hal FHal FScore: 53,480Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 2, 2024 20:0552,064331,169,322255,115,45202,277,376
2May 2, 2024 20:0552,104327,015,261255,310,30602,285,568
3May 2, 2024 20:0552,417317,255,327256,844,63802,285,568
4May 2, 2024 20:0553,399295,100,844260,655,000998,0002,265,088
5May 2, 2024 20:0553,458284,920,814259,945,0001,999,0002,289,664
6May 2, 2024 20:0553,473284,678,254261,019,0001,000,0002,273,280
7May 2, 2024 20:0553,480284,471,681260,053,0002,000,0002,281,472
8May 2, 2024 20:0553,562287,971,418260,451,0002,003,0002,375,680
9May 2, 2024 20:0553,806293,896,758260,653,0002,996,0002,289,664
10May 2, 2024 20:0553,863288,136,731261,930,0001,999,0002,265,088
11May 2, 2024 20:0553,897287,503,036261,093,0003,001,0002,265,088
12May 2, 2024 20:0586,713447,700,323421,893,0002,999,0002,523,136