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 10, 2021 14:33Dmitry DolgopolovDmitry DolgopolovScore: 181,815Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 9, 2021 06:28179,606961,307,412880,069,64102,174,976
2Jun 8, 2021 20:13179,824947,790,137881,138,24702,174,976
3Jun 8, 2021 17:43179,849959,248,871881,262,51702,183,168
4Jun 10, 2021 14:15179,856949,036,868881,295,23102,183,168
5Jun 8, 2021 17:42179,968939,321,758881,842,16402,183,168
6Jun 9, 2021 06:28179,980944,979,649881,900,50502,183,168
7Jun 8, 2021 17:42180,012936,003,743882,060,17402,301,952
8Jun 10, 2021 15:10180,044931,467,399882,214,56002,183,168
9Jun 9, 2021 14:59180,058943,616,005882,284,45302,179,072
10Jun 10, 2021 15:10180,136942,920,736882,668,41502,301,952
11Jun 10, 2021 15:10180,158959,055,877882,772,60902,256,896
12Jun 10, 2021 15:10180,179965,250,877882,875,28302,174,976
13Jun 9, 2021 06:25180,184953,687,818882,901,30502,174,976
14Jun 10, 2021 15:10180,212953,952,302883,037,01202,297,856
15Jun 10, 2021 14:13180,245937,945,067883,201,55502,174,976
16Jun 10, 2021 14:15180,258953,970,278883,263,00702,174,976
17Jun 8, 2021 17:43180,270982,910,139883,324,43502,174,976
18Jun 9, 2021 06:25180,279941,075,484883,369,24602,174,976
19Jun 10, 2021 14:15180,325952,939,781883,590,70702,183,168
20Jun 9, 2021 14:59180,429951,280,863884,100,81402,301,952
21Jun 8, 2021 17:42180,436944,438,561884,136,50602,179,072
22Jun 8, 2021 17:42180,463942,914,998884,269,78602,183,168
23Jun 8, 2021 20:13180,530946,890,002884,598,00302,170,880
24Jun 10, 2021 14:15181,058949,739,008887,183,57502,174,976
25Jun 10, 2021 14:12181,815953,789,060890,894,95402,174,976
26Jun 10, 2021 15:10182,776964,556,568895,604,10202,170,880
27Jun 10, 2021 14:15183,113961,429,144897,255,54202,174,976
28Jun 10, 2021 14:13183,343953,560,976898,378,26302,174,976
29Jun 10, 2021 14:15184,195957,570,482902,553,79102,183,168
30Jun 10, 2021 15:10184,222964,735,929902,688,31002,301,952
31Jun 8, 2021 17:43184,468966,825,510903,891,28002,179,072
32Jun 8, 2021 17:42184,519961,472,471904,144,14002,183,168
33Jun 10, 2021 14:15184,592977,804,809904,499,02602,179,072
34Jun 9, 2021 06:25184,620960,310,026904,636,21802,174,976
35Jun 9, 2021 06:28184,628971,141,693904,678,18702,301,952
36Jun 9, 2021 14:59184,663966,364,421904,850,29502,174,976
37Jun 10, 2021 14:13184,693964,488,915904,996,62502,174,976
38Jun 8, 2021 20:13184,748961,952,842905,266,42402,183,168
39Jun 10, 2021 14:12184,944968,657,193906,224,15002,179,072
40Jun 10, 2021 15:10184,976972,098,388906,383,15602,297,856
41Jun 10, 2021 14:15185,085975,911,578906,916,49602,174,976
42Jun 10, 2021 15:10186,296975,439,914912,852,27702,301,952
43Jun 10, 2021 14:33186,396979,373,837913,340,45602,187,264
44Jun 10, 2021 14:33187,155982,750,927917,060,13102,174,976
45Jun 8, 2021 17:42187,786999,541,914920,149,04802,174,976
46Jun 10, 2021 14:33191,2031,003,295,828936,893,74202,187,264
47Jun 10, 2021 14:12197,2491,029,559,565966,517,73402,174,976
48Jun 10, 2021 14:15197,3581,028,227,548967,054,35102,174,976