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 listApr 27, 2024 15:07Hal FHal FScore: 58,090Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2024 15:0756,403342,483,355276,376,30302,277,376
2Apr 27, 2024 15:0756,429348,316,473276,499,93102,277,376
3Apr 27, 2024 15:0756,485340,531,364276,775,92202,285,568
4Apr 27, 2024 15:0856,487338,798,335276,784,57802,269,184
5Apr 27, 2024 15:0756,543343,847,482277,062,41702,281,472
6Apr 27, 2024 15:0856,604334,431,600277,359,69202,281,472
7Apr 27, 2024 15:0856,736341,422,183278,007,51802,277,376
8Apr 27, 2024 15:0857,910311,185,603281,759,0001,998,0002,289,664
9Apr 27, 2024 15:0757,951305,774,357281,963,0001,999,0002,367,488
10Apr 27, 2024 15:0857,971311,846,973283,058,0001,000,0002,269,184
11Apr 27, 2024 15:0757,987306,485,616281,133,0003,001,0002,527,232
12Apr 27, 2024 15:0858,007312,187,025281,234,0003,002,0002,289,664
13Apr 27, 2024 15:0758,010306,122,241284,251,00002,269,184
14Apr 27, 2024 15:0758,023314,805,089282,313,0002,002,0002,273,280
15Apr 27, 2024 15:0758,025307,637,275282,321,0002,002,0002,289,664
16Apr 27, 2024 15:0758,044316,231,043282,414,0002,002,0002,289,664
17Apr 27, 2024 15:0758,048313,156,983282,430,0002,003,0002,265,088
18Apr 27, 2024 15:0858,053317,101,801282,455,0002,003,0002,289,664
19Apr 27, 2024 15:0758,090311,741,757281,644,0002,996,0002,523,136
20Apr 27, 2024 15:0758,090314,743,671282,643,0001,997,0002,289,664
21Apr 27, 2024 15:0858,098313,301,404282,684,0001,997,0002,289,664
22Apr 27, 2024 15:0758,099312,082,403281,688,0002,996,0002,289,664
23Apr 27, 2024 15:0758,113307,083,537281,756,0002,997,0002,523,136
24Apr 27, 2024 15:0758,114306,609,590281,760,0002,997,0002,289,664
25Apr 27, 2024 15:0758,129306,751,184281,833,0002,998,0002,265,088
26Apr 27, 2024 15:0758,136309,811,655281,868,0002,998,0002,273,280
27Apr 27, 2024 15:0758,159310,117,942282,979,0001,999,0002,265,088
28Apr 27, 2024 15:0758,200309,105,507282,180,0003,001,0002,289,664
29Apr 27, 2024 15:0758,288310,724,543282,615,0002,995,0002,289,664
30Apr 27, 2024 15:0858,307309,445,778283,705,0001,997,0002,281,472
31Apr 27, 2024 15:0758,459350,650,117286,448,86002,277,376
32Apr 27, 2024 15:0858,830311,769,853286,267,0002,001,0002,289,664
33Apr 27, 2024 15:0758,985320,581,754286,027,0003,000,0002,273,280
34Apr 27, 2024 15:0859,963317,290,121291,823,0001,998,0002,289,664
35Apr 27, 2024 15:0860,056320,672,810292,274,0002,001,0002,523,136
36Apr 27, 2024 15:0760,490363,654,374296,399,68602,273,280