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 listJul 2, 2021 14:28Yuriy LyfenkoYuriy LyfenkoScore: 115,253Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 2, 2021 14:28110,7481,069,234,443540,665,0001,998,0002,506,752
2Jul 2, 2021 14:25110,7761,070,735,708540,802,0001,999,0002,510,848
3Jul 2, 2021 14:29110,9361,073,112,750541,589,0001,998,0002,506,752
4Jul 2, 2021 14:29111,0331,068,752,905544,062,00002,510,848
5Jul 2, 2021 14:25111,1911,068,193,406543,839,000999,0002,510,848
6Jul 2, 2021 14:28111,3951,071,820,850544,835,000999,0002,510,848
7Jul 2, 2021 14:29111,5981,072,538,500544,831,0001,999,0002,506,752
8Jul 2, 2021 14:28111,6291,070,543,422545,981,000999,0002,506,752
9Jul 2, 2021 14:25111,6761,084,162,065547,212,00002,514,944
10Jul 2, 2021 14:25111,7791,081,965,872546,718,000999,0002,506,752
11Jul 2, 2021 14:29111,8861,075,451,757547,243,0001,000,0002,506,752
12Jul 2, 2021 14:25112,1411,077,937,684548,490,000999,0002,506,752
13Jul 2, 2021 14:28112,1591,075,485,100548,582,000999,0002,379,776
14Jul 2, 2021 14:28112,2491,073,061,356549,022,0001,000,0002,514,944
15Jul 2, 2021 14:28112,4511,075,491,370549,010,0002,000,0002,514,944
16Jul 2, 2021 14:28113,0141,079,333,454551,772,0001,999,0002,510,848
17Jul 2, 2021 14:25113,0951,077,173,866553,164,0001,000,0002,506,752
18Jul 2, 2021 14:29113,1691,082,306,333552,529,0001,998,0002,510,848
19Jul 2, 2021 14:28113,2001,086,126,508552,682,0001,998,0002,523,136
20Jul 2, 2021 14:28113,3091,081,656,003555,215,00002,260,992
21Jul 2, 2021 14:25113,5431,082,915,124555,359,0001,000,0002,506,752
22Jul 2, 2021 14:25113,8131,087,851,089555,688,0001,998,0002,514,944
23Jul 2, 2021 14:25114,6151,092,640,979560,615,000999,0002,506,752
24Jul 2, 2021 14:29115,0801,090,331,293562,894,000999,0002,506,752
25Jul 2, 2021 14:28115,2531,096,277,892562,740,0001,999,0002,260,992
26Jul 2, 2021 14:29115,3971,098,289,704563,449,0001,998,0002,379,776
27Jul 2, 2021 14:28115,7861,096,236,960565,354,0001,997,0002,371,584
28Jul 2, 2021 14:28116,0871,101,474,672566,829,0001,999,0002,506,752
29Jul 2, 2021 14:29116,7881,103,571,836572,259,00002,510,848
30Jul 2, 2021 14:28116,7941,101,807,635572,289,00002,367,488
31Jul 2, 2021 14:29117,0341,105,352,295571,469,0001,998,0002,510,848
32Jul 2, 2021 14:28117,0801,100,782,468572,695,000999,0002,506,752
33Jul 2, 2021 14:28117,3861,104,611,267574,190,0001,000,0002,506,752
34Jul 2, 2021 14:28118,5781,107,945,557579,032,0002,000,0002,506,752
35Jul 2, 2021 14:28118,7581,112,476,715579,913,0001,999,0002,510,848
36Jul 2, 2021 14:28119,6081,112,318,248584,081,0002,000,0002,506,752
37Jul 2, 2021 14:28126,2201,185,186,992618,476,40102,228,224
38Jul 2, 2021 14:25126,3171,200,421,157618,953,65302,232,320
39Jul 2, 2021 14:29126,4851,188,977,813619,775,74602,224,128
40Jul 2, 2021 14:29126,8081,205,318,290621,359,98702,236,416
41Jul 2, 2021 14:25126,9791,186,875,978622,197,44202,228,224
42Jul 2, 2021 14:28127,2061,191,579,045623,311,15402,228,224
43Jul 2, 2021 14:28127,7541,199,137,878625,994,41102,228,224
44Jul 2, 2021 14:29127,8921,179,277,217626,669,75702,224,128
45Jul 2, 2021 14:25128,3201,192,865,048628,766,12202,220,032
46Jul 2, 2021 14:28128,5151,201,546,773629,724,16802,236,416
47Jul 2, 2021 14:28129,2111,201,922,501633,135,65202,228,224
48Jul 2, 2021 14:28131,7151,197,870,617645,401,97802,228,224