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 09:14matsuoka-601matsuoka-601Score: 60,568Success
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 09:1359,747316,423,772289,763,0002,997,0002,293,760
2Jun 12, 2024 09:1359,760316,287,581289,826,0002,998,0002,416,640
3Jun 12, 2024 09:1459,772323,810,499289,884,0002,998,0002,293,760
4Jun 12, 2024 09:1359,772320,125,532289,884,0002,998,0002,293,760
5Jun 12, 2024 09:1459,788316,702,056290,961,0001,999,0002,461,696
6Jun 12, 2024 09:1359,815317,975,454290,094,0003,000,0002,416,640
7Jun 12, 2024 09:1359,831316,146,477290,173,0003,001,0002,293,760
8Jun 12, 2024 09:1459,845318,088,837290,237,0003,002,0002,293,760
9Jun 12, 2024 09:1460,528324,882,072293,593,0002,995,0002,416,640
10Jun 12, 2024 09:1360,546322,480,227293,677,0002,996,0002,420,736
11Jun 12, 2024 09:1460,552321,988,756293,710,0002,997,0002,420,736
12Jun 12, 2024 09:1360,557319,989,447293,733,0002,997,0002,424,832
13Jun 12, 2024 09:1360,568318,569,937293,786,0002,997,0002,420,736
14Jun 12, 2024 09:1360,652324,694,998294,192,0003,001,0002,428,928
15Jun 12, 2024 09:1460,657325,348,512294,216,0003,002,0002,293,760
16Jun 12, 2024 09:1460,674318,553,856295,299,0002,002,0002,424,832
17Jun 12, 2024 09:1460,838378,519,854298,106,82902,281,472
18Jun 12, 2024 09:1360,875350,608,205298,285,70602,273,280
19Jun 12, 2024 09:1360,890359,010,031298,360,80802,281,472
20Jun 12, 2024 09:1360,924359,901,110298,528,57502,277,376
21Jun 12, 2024 09:1462,167326,492,447302,622,0001,997,0002,293,760
22Jun 12, 2024 09:1462,385371,697,127305,685,55102,277,376
23Jun 12, 2024 09:1463,587384,287,394311,578,39002,273,280
24Jun 12, 2024 09:1477,444405,307,202377,473,0002,002,0002,293,760