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:26matsuoka-601matsuoka-601Score: 58,418Success
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:2654,181322,468,872265,487,30902,260,992
2Jun 14, 2024 13:2654,194332,533,924265,550,76102,273,280
3Jun 14, 2024 13:2655,744335,976,576273,147,43502,269,184
4Jun 14, 2024 13:2658,307312,102,767283,699,0002,004,0002,293,760
5Jun 14, 2024 13:2658,341306,525,242282,871,0002,998,0002,293,760
6Jun 14, 2024 13:2658,402309,702,890284,170,0002,001,0002,416,640
7Jun 14, 2024 13:2658,418309,739,924285,248,0001,000,0002,293,760
8Jun 14, 2024 13:2658,707311,824,588284,669,0002,996,0002,293,760
9Jun 14, 2024 13:2658,731312,611,325285,785,0001,998,0002,293,760
10Jun 14, 2024 13:2658,733310,664,684284,795,0002,997,0002,428,928
11Jun 14, 2024 13:2658,734310,551,033284,800,0002,997,0002,293,760
12Jun 14, 2024 13:2661,036321,823,214296,076,0003,000,0002,420,736