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 07:19matsuoka-601matsuoka-601Score: 62,024Success
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 07:2060,953326,985,339295,676,0002,996,0002,285,568
2Jun 12, 2024 07:2060,953324,269,403296,675,0001,997,0002,310,144
3Jun 12, 2024 07:2061,017320,210,108297,984,000999,0002,301,952
4Jun 12, 2024 07:2061,028322,844,677297,037,0002,000,0002,285,568
5Jun 12, 2024 07:2061,199323,030,976296,878,0002,998,0002,306,048
6Jun 12, 2024 07:1961,233325,829,361299,042,0001,000,0002,310,144
7Jun 12, 2024 07:1961,251322,160,605298,132,0002,000,0002,285,568
8Jun 12, 2024 07:2061,278323,332,625297,258,0003,002,0002,285,568
9Jun 12, 2024 07:2061,294321,351,683298,341,0002,002,0002,412,544
10Jun 12, 2024 07:2061,363322,352,659297,681,0002,996,0002,285,568
11Jun 12, 2024 07:2061,390324,487,999298,811,0001,998,0002,322,432
12Jun 12, 2024 07:2061,390333,006,740297,815,0002,998,0002,322,432
13Jun 12, 2024 07:1961,413322,030,385298,927,0001,999,0002,314,240
14Jun 12, 2024 07:2061,426325,567,257297,990,0002,999,0002,285,568
15Jun 12, 2024 07:2061,647325,523,500299,069,0003,000,0002,301,952
16Jun 12, 2024 07:1961,943368,523,188303,520,22202,269,184
17Jun 12, 2024 07:1961,975378,814,819303,678,35602,277,376
18Jun 12, 2024 07:2062,008367,551,114303,840,66202,273,280
19Jun 12, 2024 07:2062,024370,082,532303,919,77802,285,568
20Jun 12, 2024 07:2062,070363,892,444304,141,74202,269,184
21Jun 12, 2024 07:2062,100390,441,524304,291,73302,269,184
22Jun 12, 2024 07:2062,572331,488,911305,604,000998,0002,285,568
23Jun 12, 2024 07:2062,826380,323,361307,849,61502,269,184
24Jun 12, 2024 07:1962,882333,006,698305,122,0003,001,0002,285,568
25Jun 12, 2024 07:1963,270337,850,346307,024,0003,000,0002,285,568
26Jun 12, 2024 07:2063,390378,584,563310,609,85702,273,280
27Jun 12, 2024 07:2063,559338,280,916309,436,0002,002,0002,301,952
28Jun 12, 2024 07:2064,009339,798,017311,640,0002,004,0002,285,568
29Jun 12, 2024 07:1964,050376,649,014313,846,07402,273,280
30Jun 12, 2024 07:1964,206342,450,210311,613,0002,996,0002,297,856
31Jun 12, 2024 07:2064,774347,576,362315,392,0002,002,0002,301,952
32Jun 12, 2024 07:2065,665346,282,807319,760,0001,998,0002,322,432
33Jun 12, 2024 07:2066,090347,756,704320,842,0002,998,0002,285,568
34Jun 12, 2024 07:1971,809372,671,985348,868,0002,998,0002,301,952
35Jun 12, 2024 07:1974,345387,307,250363,292,0001,000,0002,285,568
36Jun 12, 2024 07:1997,472505,568,350475,615,0001,998,0002,301,952