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 listMay 20, 2021 03:25Yuriy LyfenkoYuriy LyfenkoScore: 273,188Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 19, 2021 23:09227,2631,168,433,1841,113,588,73802,240,512
2May 19, 2021 23:28227,2861,176,117,9041,113,701,28202,232,320
3May 19, 2021 23:13227,4641,182,942,0801,114,572,20302,244,608
4May 19, 2021 23:13227,4761,176,907,0261,114,631,66802,244,608
5May 19, 2021 23:15227,9141,186,737,6861,116,777,73002,244,608
6May 19, 2021 23:28228,8391,174,160,1831,121,311,70402,236,416
7May 19, 2021 23:28228,9281,191,333,9731,121,747,44702,236,416
8May 19, 2021 23:15229,0451,189,064,4821,122,321,41402,244,608
9May 19, 2021 23:09229,0921,172,834,6741,122,548,92502,236,416
10May 20, 2021 03:25229,1381,185,334,4231,122,777,56802,236,416
11May 20, 2021 03:25229,1911,198,074,7851,123,033,50702,240,512
12May 20, 2021 03:25229,3801,196,908,4901,123,961,32402,236,416
13May 19, 2021 23:13230,0141,201,615,4041,127,068,92302,248,704
14May 19, 2021 23:09232,4951,205,497,7951,139,223,64502,240,512
15May 19, 2021 23:15236,6461,223,261,3561,159,565,83502,240,512
16May 19, 2021 23:28271,7741,399,825,9651,331,690,35202,232,320
17May 19, 2021 23:15272,0521,394,741,9971,333,054,71102,236,416
18May 19, 2021 23:13272,3561,391,754,2691,334,546,71202,236,416
19May 19, 2021 23:28272,3831,405,670,3271,334,677,75002,240,512
20May 19, 2021 23:28272,6641,413,231,0671,336,053,91002,228,224
21May 19, 2021 23:13272,9221,414,179,1941,337,319,91302,224,128
22May 19, 2021 23:13273,1321,394,811,0341,338,347,39502,248,704
23May 19, 2021 23:09273,1881,395,987,8401,338,621,08602,240,512
24May 19, 2021 23:15273,3141,404,335,6391,339,239,17102,273,280
25May 20, 2021 03:25273,3161,399,465,0181,339,250,61202,244,608
26May 19, 2021 23:15273,3201,412,415,8041,339,268,57402,240,512
27May 19, 2021 23:28273,3581,400,639,1021,339,452,30302,232,320
28May 19, 2021 23:13273,3931,404,521,4041,339,625,90802,240,512
29May 20, 2021 03:25273,4091,403,609,7731,339,702,98902,244,608
30May 19, 2021 23:13273,6221,398,711,5111,340,747,50102,232,320
31May 19, 2021 23:09273,7681,411,382,3271,341,463,91602,240,512
32May 20, 2021 03:25273,7891,404,001,3531,341,565,57902,244,608
33May 19, 2021 23:15273,8301,403,971,4631,341,767,88002,244,608
34May 20, 2021 03:25273,8631,404,930,9381,341,926,27502,236,416
35May 19, 2021 23:09274,3011,408,647,5641,344,072,53502,224,128
36May 19, 2021 23:28274,4591,410,208,0421,344,851,35802,236,416
37May 20, 2021 03:25274,6751,407,088,4541,345,907,02102,228,224
38May 19, 2021 23:15274,7431,405,182,4191,346,239,51602,236,416
39May 19, 2021 23:09274,9291,424,708,4951,347,149,94502,240,512
40May 19, 2021 23:28275,5001,417,942,8131,349,951,43902,240,512
41May 20, 2021 03:25275,5431,416,181,0221,350,160,94402,240,512
42May 19, 2021 23:09276,2021,416,577,4911,353,389,10602,269,184
43May 19, 2021 23:13276,6361,429,450,1501,355,517,97702,236,416
44May 19, 2021 23:09276,8921,413,846,7891,356,770,65102,244,608
45May 19, 2021 23:15278,2491,431,366,5041,363,420,78402,240,512