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:43matsuoka-601matsuoka-601Score: 53,542Success
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:4352,709325,628,550258,274,57902,232,320
2Jun 15, 2024 05:4352,722325,481,351258,336,60502,236,416
3Jun 15, 2024 05:4352,727323,276,297258,361,70702,375,680
4Jun 15, 2024 05:4352,826325,822,305258,845,67802,244,608
5Jun 15, 2024 05:4352,886321,904,273259,140,68702,236,416
6Jun 15, 2024 05:4353,154328,639,593260,455,87402,228,224
7Jun 15, 2024 05:4353,227329,720,118260,813,89602,236,416
8Jun 15, 2024 05:4353,514281,931,814259,215,0003,002,0002,281,472
9Jun 15, 2024 05:4353,516289,744,385259,228,0003,002,0002,289,664
10Jun 15, 2024 05:4353,518287,351,972260,236,0002,001,0002,281,472
11Jun 15, 2024 05:4353,519286,893,526259,240,0003,002,0002,498,560
12Jun 15, 2024 05:4353,519289,775,190259,241,0003,002,0002,281,472
13Jun 15, 2024 05:4353,519285,517,476260,244,0002,001,0002,494,464
14Jun 15, 2024 05:4353,520288,737,412261,247,0001,000,0002,281,472
15Jun 15, 2024 05:4353,520291,042,653259,244,0003,002,0002,289,664
16Jun 15, 2024 05:4353,525288,128,807260,272,0002,002,0002,519,040
17Jun 15, 2024 05:4353,534284,918,868260,315,0002,002,0002,293,760
18Jun 15, 2024 05:4353,539290,490,227260,337,0002,002,0002,289,664
19Jun 15, 2024 05:4353,542290,250,151259,354,0003,004,0002,281,472
20Jun 15, 2024 05:4353,591289,580,333260,600,0001,996,0002,519,040
21Jun 15, 2024 05:4353,608288,104,874260,682,0001,997,0002,490,368
22Jun 15, 2024 05:4353,609289,118,847261,688,000998,0002,502,656
23Jun 15, 2024 05:4353,611287,078,377260,699,0001,997,0002,490,368
24Jun 15, 2024 05:4353,649289,989,393259,881,0002,998,0002,490,368
25Jun 15, 2024 05:4353,870290,397,472260,964,0002,999,0002,494,464
26Jun 15, 2024 05:4353,873288,510,153260,981,0002,999,0002,494,464
27Jun 15, 2024 05:4353,889284,490,894261,054,0003,000,0002,289,664
28Jun 15, 2024 05:4354,009292,436,279261,650,0002,995,0002,289,664
29Jun 15, 2024 05:4354,020289,397,636261,704,0002,996,0002,351,104
30Jun 15, 2024 05:4354,237287,338,615262,766,0002,997,0002,347,008
31Jun 15, 2024 05:4354,256289,967,800262,854,0002,998,0002,494,464
32Jun 15, 2024 05:4354,567328,684,029267,379,90202,240,512
33Jun 15, 2024 05:4354,770292,591,929267,371,0001,001,0002,281,472
34Jun 15, 2024 05:4355,041293,176,387267,706,0001,997,0002,486,272
35Jun 15, 2024 05:4355,153295,321,563268,250,0002,001,0002,285,568
36Jun 15, 2024 05:4355,361342,401,434271,267,65902,228,224