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 07:00matsuoka-601matsuoka-601Score: 66,233Success
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 07:0064,233345,024,221306,747,0007,993,0002,375,680
2Jun 12, 2024 07:0064,234347,388,436307,751,0006,994,0002,473,984
3Jun 12, 2024 07:0064,565338,600,485308,359,0008,009,0002,355,200
4Jun 12, 2024 07:0064,680344,952,693312,933,0003,999,0002,461,696
5Jun 12, 2024 07:0064,799342,646,365310,503,0007,011,0002,351,104
6Jun 12, 2024 07:0065,060346,262,062311,798,0006,995,0002,490,368
7Jun 12, 2024 07:0066,233391,174,417324,543,57802,265,088
8Jun 12, 2024 07:0066,484384,145,181325,773,29402,301,952
9Jun 12, 2024 07:0066,948352,886,271320,046,0008,001,0002,363,392
10Jun 12, 2024 07:0067,598396,539,773331,231,95802,215,936
11Jun 12, 2024 07:0069,164364,428,437334,907,0003,998,0002,367,488
12Jun 12, 2024 07:0081,682421,099,630394,237,0006,003,0002,510,848