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 15, 2024 05:58matsuoka-601matsuoka-601Score: 56,464Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 15, 2024 05:5852,138330,326,818255,474,54202,240,512
2Jun 15, 2024 05:5852,258339,317,917256,065,75502,232,320
3Jun 15, 2024 05:5852,318325,187,373256,356,15702,240,512
4Jun 15, 2024 05:5854,358322,345,688266,353,39402,244,608
5Jun 15, 2024 05:5854,430331,568,882266,706,59102,244,608
6Jun 15, 2024 05:5854,455332,575,822266,831,90102,232,320
7Jun 15, 2024 05:5856,453302,463,417273,623,0002,995,0002,289,664
8Jun 15, 2024 05:5856,454300,770,698273,628,0002,995,0002,277,376
9Jun 15, 2024 05:5856,454305,000,248273,630,0002,995,0002,289,664
10Jun 15, 2024 05:5856,457303,046,228273,642,0002,996,0002,289,664
11Jun 15, 2024 05:5856,458303,790,395274,646,0001,997,0002,494,464
12Jun 15, 2024 05:5856,463302,414,075273,673,0002,996,0002,498,560
13Jun 15, 2024 05:5856,464304,816,848274,675,0001,997,0002,281,472
14Jun 15, 2024 05:5856,464302,988,061273,678,0002,996,0002,293,760
15Jun 15, 2024 05:5856,466302,983,457275,685,000998,0002,490,368
16Jun 15, 2024 05:5856,467300,984,064273,690,0002,996,0002,498,560
17Jun 15, 2024 05:5856,479306,280,195273,749,0002,997,0002,490,368
18Jun 15, 2024 05:5856,487301,180,066273,790,0002,997,0002,486,272
19Jun 15, 2024 05:5856,593299,371,149277,304,00002,281,472
20Jun 15, 2024 05:5856,611301,323,498275,391,0002,002,0002,342,912
21Jun 15, 2024 05:5856,744305,854,715276,046,0002,000,0002,289,664
22Jun 15, 2024 05:5856,866310,028,997276,647,0001,997,0002,494,464
23Jun 15, 2024 05:5857,484305,321,838278,676,0002,996,0002,285,568
24Jun 15, 2024 05:5857,685309,036,246279,660,0002,996,0002,334,720