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 14, 2024 13:24matsuoka-601matsuoka-601Score: 57,396Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 14, 2024 13:2455,675331,114,593272,805,78802,273,280
2Jun 14, 2024 13:2455,714345,483,751273,000,54302,277,376
3Jun 14, 2024 13:2456,599298,891,440275,335,0002,002,0002,265,088
4Jun 14, 2024 13:2456,621307,358,485275,448,0001,996,0002,416,640
5Jun 14, 2024 13:2456,684300,389,139276,748,0001,002,0002,416,640
6Jun 14, 2024 13:2457,077313,223,730278,680,000998,0002,293,760
7Jun 14, 2024 13:2457,396350,087,114281,241,92102,277,376
8Jun 14, 2024 13:2457,551308,297,967279,000,0003,000,0002,293,760
9Jun 14, 2024 13:2457,759309,173,933282,020,0001,000,0002,441,216
10Jun 14, 2024 13:2457,796308,938,655281,197,0002,001,0002,293,760
11Jun 14, 2024 13:2459,585315,205,186289,966,0001,999,0002,293,760
12Jun 14, 2024 13:2473,434387,898,018356,827,0002,998,0002,412,544