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 listDec 14, 2024 13:29matsuoka-601matsuoka-601Score: 52,606Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 12, 2024 17:4852,497278,636,857256,234,0001,000,0002,277,376
2Sep 5, 2024 04:1452,512286,793,515256,308,0001,001,0002,281,472
3Dec 12, 2024 17:4852,528284,135,385256,387,0001,001,0002,539,520
4Dec 12, 2024 17:4852,540279,599,657255,451,0001,995,0002,539,520
5Dec 12, 2024 17:4852,544287,020,052256,463,0001,001,0002,326,528
6Dec 12, 2024 17:4852,563284,000,831256,558,0001,002,0002,277,376
7Dec 12, 2024 17:4852,605282,058,753255,766,0001,998,0002,539,520
8Dec 12, 2024 17:4852,606278,277,999255,769,0001,998,0002,277,376
9Sep 5, 2024 04:1453,005286,594,614257,727,0001,997,0002,420,736
10Sep 5, 2024 04:1453,064287,200,238258,015,0002,000,0002,334,720
11Dec 12, 2024 17:4853,420286,759,240259,762,0001,998,0002,277,376
12Dec 12, 2024 17:4853,879288,700,116262,005,0002,000,0002,326,528
13Dec 14, 2024 13:2959,965332,031,221290,839,0002,988,0002,334,720
14Dec 14, 2024 13:2960,041331,478,288289,217,0004,986,0002,322,432
15Dec 14, 2024 13:2960,070335,484,049290,381,0003,964,0002,535,424