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, 2024 06:56matsuoka-601matsuoka-601Score: 63,015Success
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, 2024 06:5662,425330,892,827299,885,0005,997,0002,338,816
2Jun 12, 2024 06:5662,786333,644,768303,656,0003,995,0002,473,984
3Jun 12, 2024 06:5662,835331,637,811300,895,0006,997,0002,322,432
4Jun 12, 2024 06:5662,940337,802,202303,400,0005,006,0002,457,600
5Jun 12, 2024 06:5662,947335,718,736302,433,0006,008,0002,314,240
6Jun 12, 2024 06:5662,962333,590,485303,504,0005,008,0002,469,888
7Jun 12, 2024 06:5663,015332,263,356303,778,0004,996,0002,523,136
8Jun 12, 2024 06:5663,041331,852,834303,903,0004,998,0002,379,776
9Jun 12, 2024 06:5663,766376,416,108312,451,22802,265,088
10Jun 12, 2024 06:5663,796382,152,680312,600,46602,260,992
11Jun 12, 2024 06:5663,855336,043,849304,894,0007,997,0002,318,336
12Jun 12, 2024 06:5663,908388,710,041313,148,53302,256,896