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 08:21matsuoka-601matsuoka-601Score: 59,394Success
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 08:4558,721311,328,841284,738,0002,997,0002,420,736
2Jun 12, 2024 08:4558,723311,852,940285,744,0001,998,0002,420,736
3Jun 12, 2024 08:4558,740313,486,058285,830,0001,998,0002,289,664
4Jun 12, 2024 08:4558,764315,174,496284,944,0002,999,0002,293,760
5Jun 12, 2024 08:4558,786311,498,216285,053,0003,000,0002,416,640
6Jun 12, 2024 08:4558,788311,623,126285,061,0003,000,0002,293,760
7Jun 12, 2024 08:2158,803308,605,640285,136,0003,001,0002,420,736
8Jun 12, 2024 08:2158,906313,496,081286,642,0001,997,0002,416,640
9Jun 12, 2024 08:4559,026320,410,754287,227,0002,001,0002,437,120
10Jun 12, 2024 08:4559,152314,308,503287,849,0001,998,0002,293,760
11Jun 12, 2024 08:4559,161312,987,960286,892,0002,998,0002,523,136
12Jun 12, 2024 08:2159,228322,269,401289,216,0001,000,0002,424,832
13Jun 12, 2024 08:4559,360311,490,957288,866,0001,999,0002,420,736
14Jun 12, 2024 08:2159,361319,269,537287,871,0002,998,0002,424,832
15Jun 12, 2024 08:4559,366318,249,810287,894,0002,998,0002,293,760
16Jun 12, 2024 08:2159,380314,341,501288,965,0001,999,0002,293,760
17Jun 12, 2024 08:4559,382315,580,298287,972,0002,999,0002,293,760
18Jun 12, 2024 08:4559,394313,143,232288,033,0003,000,0002,420,736
19Jun 12, 2024 08:2159,394311,223,338289,030,0002,000,0002,293,760
20Jun 12, 2024 08:4559,653316,645,121290,299,0002,002,0002,293,760
21Jun 12, 2024 08:2160,232317,749,758293,139,0002,000,0002,293,760
22Jun 12, 2024 08:2160,491322,467,112293,400,0003,004,0002,424,832
23Jun 12, 2024 08:2160,834356,639,391298,085,42102,265,088
24Jun 12, 2024 08:2160,852374,900,038298,176,48302,260,992
25Jun 12, 2024 08:2160,854371,744,647298,182,70902,273,280
26Jun 12, 2024 08:4561,290364,199,308300,320,66202,281,472
27Jun 12, 2024 08:4561,785371,979,847302,747,86202,277,376
28Jun 12, 2024 08:4561,863373,197,019303,127,14502,281,472
29Jun 12, 2024 08:4561,892368,431,388303,271,43702,277,376
30Jun 12, 2024 08:4562,374334,583,892304,637,000998,0002,416,640
31Jun 12, 2024 08:4562,385363,104,717305,684,14102,285,568
32Jun 12, 2024 08:4563,033367,393,087308,862,15102,281,472
33Jun 12, 2024 08:4563,715334,580,237309,204,0003,001,0002,420,736
34Jun 12, 2024 08:4564,350343,894,341313,315,0002,002,0002,293,760
35Jun 12, 2024 08:4565,463345,082,063317,771,0002,997,0002,420,736
36Jun 12, 2024 08:2174,054390,855,206359,866,0002,998,0002,441,216