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 13:42matsuoka-601matsuoka-601Score: 59,787Success
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 13:4259,200355,217,262290,081,16702,285,568
2Jun 12, 2024 13:4259,216359,734,130290,158,48502,281,472
3Jun 12, 2024 13:4459,219348,937,322290,175,38202,277,376
4Jun 12, 2024 13:4459,239366,060,276290,272,77902,289,664
5Jun 12, 2024 13:4459,243348,760,427290,289,57802,285,568
6Jun 12, 2024 13:4259,298346,583,122290,558,77402,281,472
7Jun 12, 2024 13:4259,489317,683,565290,495,0001,001,0002,293,760
8Jun 12, 2024 13:4459,517319,793,024289,634,0001,997,0002,428,928
9Jun 12, 2024 13:4459,519315,837,270288,648,0002,996,0002,293,760
10Jun 12, 2024 13:4259,528319,086,294289,688,0001,997,0002,293,760
11Jun 12, 2024 13:4459,529321,465,399289,695,0001,997,0002,293,760
12Jun 12, 2024 13:4259,534319,020,274288,718,0002,997,0002,420,736
13Jun 12, 2024 13:4259,555317,062,240289,821,0001,998,0002,437,120
14Jun 12, 2024 13:4459,607319,425,400290,073,0002,000,0002,293,760
15Jun 12, 2024 13:4259,611363,742,097292,094,86102,277,376
16Jun 12, 2024 13:4259,764321,771,662289,844,0002,998,0002,293,760
17Jun 12, 2024 13:4459,784317,721,601289,945,0002,999,0002,420,736
18Jun 12, 2024 13:4259,787316,991,789289,957,0002,999,0002,293,760
19Jun 12, 2024 13:4259,787314,774,537289,956,0002,999,0002,293,760
20Jun 12, 2024 13:4259,797318,682,742291,004,0002,000,0002,424,832
21Jun 12, 2024 13:4259,807323,334,545290,056,0003,000,0002,441,216
22Jun 12, 2024 13:4259,817315,872,783291,105,0002,000,0002,293,760
23Jun 12, 2024 13:4259,848315,494,857291,253,0002,001,0002,412,544
24Jun 12, 2024 13:4259,867316,786,191291,345,0002,002,0002,293,760
25Jun 12, 2024 13:4459,957319,010,644290,794,0002,997,0002,293,760
26Jun 12, 2024 13:4459,999319,027,014290,994,0002,999,0002,293,760
27Jun 12, 2024 13:4460,005315,258,848291,025,0003,000,0002,293,760
28Jun 12, 2024 13:4260,008320,536,331292,040,0002,000,0002,293,760
29Jun 12, 2024 13:4260,018324,510,734292,086,0002,000,0002,420,736
30Jun 12, 2024 13:4460,019319,758,578291,092,0003,000,0002,428,928
31Jun 12, 2024 13:4260,038322,591,971291,184,0003,001,0002,523,136
32Jun 12, 2024 13:4260,659356,812,958297,228,31802,289,664
33Jun 12, 2024 13:4260,840360,037,984298,116,64702,281,472
34Jun 12, 2024 13:4261,487323,574,475299,283,0002,001,0002,420,736
35Jun 12, 2024 13:4262,245330,654,790303,000,0002,000,0002,420,736
36Jun 12, 2024 13:4278,998413,424,467384,090,0003,000,0002,293,760