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 14, 2024 13:11matsuoka-601matsuoka-601Score: 55,199Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 14, 2024 13:1154,072326,377,397264,952,06102,277,376
2Jun 14, 2024 13:4554,124331,135,273265,207,42602,273,280
3Jun 14, 2024 13:1154,127326,148,687265,224,43802,273,280
4Jun 14, 2024 13:4554,131335,264,779265,242,65502,281,472
5Jun 14, 2024 13:1254,140334,132,904265,285,38802,281,472
6Jun 14, 2024 13:1254,206328,598,592265,609,60602,281,472
7Jun 14, 2024 13:4554,836296,690,652265,698,0002,996,0002,416,640
8Jun 14, 2024 13:1254,928295,831,015267,144,0002,001,0002,293,760
9Jun 14, 2024 13:4554,947292,673,845266,236,0003,002,0002,416,640
10Jun 14, 2024 13:4554,971293,439,640268,356,0001,001,0002,293,760
11Jun 14, 2024 13:1154,974292,821,412267,373,0002,002,0002,293,760
12Jun 14, 2024 13:1254,977298,966,379267,387,0002,002,0002,293,760
13Jun 14, 2024 13:1254,981299,324,702268,408,0001,001,0002,420,736
14Jun 14, 2024 13:4554,995296,021,573267,472,0002,003,0002,424,832
15Jun 14, 2024 13:4554,998298,997,363267,489,0002,003,0002,293,760
16Jun 14, 2024 13:1155,004300,099,233267,518,0002,003,0002,293,760
17Jun 14, 2024 13:1155,035333,936,965269,671,82002,277,376
18Jun 14, 2024 13:1255,120291,115,295267,089,0003,001,0002,293,760
19Jun 14, 2024 13:1155,199302,542,074268,473,0002,003,0002,412,544
20Jun 14, 2024 13:1155,212297,572,435268,536,0002,004,0002,293,760
21Jun 14, 2024 13:1255,311298,581,120268,024,0003,000,0002,293,760
22Jun 14, 2024 13:1155,312291,963,480268,030,0003,000,0002,420,736
23Jun 14, 2024 13:1155,317292,534,396269,052,0002,000,0002,424,832
24Jun 14, 2024 13:1255,319300,019,032268,061,0003,000,0002,293,760
25Jun 14, 2024 13:1155,325295,678,744268,091,0003,001,0002,293,760
26Jun 14, 2024 13:4555,330293,471,794269,118,0002,000,0002,293,760
27Jun 14, 2024 13:1155,356294,783,107268,242,0003,002,0002,293,760
28Jun 14, 2024 13:1155,370298,122,698269,313,0002,002,0002,416,640
29Jun 14, 2024 13:4555,384292,025,483270,379,0001,001,0002,293,760
30Jun 14, 2024 13:1255,386298,181,101269,389,0002,002,0002,293,760
31Jun 14, 2024 13:1255,442296,467,809268,672,0002,996,0002,293,760
32Jun 14, 2024 13:4555,569333,053,775272,288,18302,273,280
33Jun 14, 2024 13:4555,947301,000,508272,141,0002,001,0002,293,760
34Jun 14, 2024 13:1256,720344,552,031277,928,98002,277,376
35Jun 14, 2024 13:1265,615356,142,867320,511,0001,001,0002,293,760
36Jun 14, 2024 13:4570,072365,457,674342,353,0001,001,0002,293,760