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 14:44matsuoka-601matsuoka-601Score: 56,468Success
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 14:4452,127328,862,169255,422,01502,240,512
2Jun 15, 2024 14:4552,132326,346,787255,447,64302,236,416
3Jun 15, 2024 14:4452,138326,683,601255,476,59602,375,680
4Jun 15, 2024 14:4452,139320,400,382255,478,89902,236,416
5Jun 15, 2024 14:4552,141322,182,604255,492,42902,236,416
6Jun 15, 2024 14:4552,145326,276,094255,508,09702,232,320
7Jun 15, 2024 14:4452,147331,643,723255,518,22602,236,416
8Jun 15, 2024 14:4452,150331,298,513255,535,33102,224,128
9Jun 15, 2024 14:4452,444318,406,293256,977,71102,224,128
10Jun 15, 2024 14:4453,329327,082,365261,314,25602,228,224
11Jun 15, 2024 14:4453,825328,673,104263,740,17302,240,512
12Jun 15, 2024 14:4454,361339,975,468266,370,75102,248,704
13Jun 15, 2024 14:4556,385303,240,960274,285,0002,002,0002,334,720
14Jun 15, 2024 14:4456,429303,671,089274,497,0002,003,0002,498,560
15Jun 15, 2024 14:4456,433304,956,918274,517,0002,003,0002,490,368
16Jun 15, 2024 14:4456,433309,117,901274,521,0002,003,0002,478,080
17Jun 15, 2024 14:4556,434307,960,586275,527,0001,001,0002,289,664
18Jun 15, 2024 14:4456,436302,653,481274,532,0002,003,0002,494,464
19Jun 15, 2024 14:4456,437306,557,184275,538,0001,001,0002,289,664
20Jun 15, 2024 14:4456,452301,787,786273,619,0002,995,0002,285,568
21Jun 15, 2024 14:4456,464307,129,656274,676,0001,997,0002,289,664
22Jun 15, 2024 14:4456,466306,001,839273,688,0002,996,0002,498,560
23Jun 15, 2024 14:4456,466302,529,172273,686,0002,996,0002,490,368
24Jun 15, 2024 14:4456,467302,628,514273,694,0002,996,0002,281,472
25Jun 15, 2024 14:4456,468298,574,512274,698,0001,997,0002,486,272
26Jun 15, 2024 14:4456,468308,095,798273,699,0002,996,0002,289,664
27Jun 15, 2024 14:4456,468299,721,161274,694,0001,997,0002,322,432
28Jun 15, 2024 14:4556,470298,344,696274,704,0001,997,0002,490,368
29Jun 15, 2024 14:4556,470301,898,299273,709,0002,996,0002,490,368
30Jun 15, 2024 14:4456,470303,428,918273,706,0002,996,0002,490,368
31Jun 15, 2024 14:4456,473308,269,695274,723,0001,997,0002,293,760
32Jun 15, 2024 14:4556,474303,092,703273,727,0002,997,0002,289,664
33Jun 15, 2024 14:4556,475305,339,005275,729,000999,0002,289,664
34Jun 15, 2024 14:4456,475306,658,849274,731,0001,998,0002,289,664
35Jun 15, 2024 14:4456,479301,704,046274,747,0001,998,0002,289,664
36Jun 15, 2024 14:4456,480299,464,830273,754,0002,997,0002,338,816
37Jun 15, 2024 14:4456,480304,610,023273,753,0002,997,0002,281,472
38Jun 15, 2024 14:4456,504300,241,748274,870,0001,999,0002,318,336
39Jun 15, 2024 14:4456,904303,920,128275,831,0002,998,0002,281,472
40Jun 15, 2024 14:4556,948301,809,745276,044,0003,000,0002,285,568
41Jun 15, 2024 14:4456,969301,544,964276,148,0003,001,0002,498,560
42Jun 15, 2024 14:4457,086312,781,460277,723,0001,998,0002,494,464
43Jun 15, 2024 14:4457,425303,737,985279,381,0002,002,0002,502,656
44Jun 15, 2024 14:4557,429308,487,636279,400,0002,002,0002,510,848
45Jun 15, 2024 14:4457,781305,242,470280,126,0003,001,0002,281,472
46Jun 15, 2024 14:4458,273317,150,430283,537,0002,003,0002,486,272
47Jun 15, 2024 14:4558,393308,825,169283,123,0003,001,0002,285,568
48Jun 15, 2024 14:4458,480312,782,813285,550,0001,001,0002,519,040