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 10, 2021 21:24Sergey StreminSergey StreminScore: 506,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 10, 2021 21:24435,6002,198,165,5422,134,441,37902,203,648
2May 10, 2021 21:25435,6392,209,704,9132,134,629,60502,199,552
3May 10, 2021 21:24435,6842,205,469,7102,134,849,33002,199,552
4May 10, 2021 21:24435,8052,204,405,2312,135,444,66002,207,744
5May 10, 2021 21:25435,8102,207,526,8382,135,466,85202,203,648
6May 10, 2021 21:25435,9322,195,733,5862,136,065,12102,199,552
7May 10, 2021 21:24435,9592,214,794,0052,136,197,57302,187,264
8May 10, 2021 21:24436,0622,209,562,0932,136,704,99302,211,840
9May 10, 2021 21:24436,9802,203,486,1652,141,203,81302,207,744
10May 10, 2021 21:24506,1882,540,012,6312,480,322,81202,199,552
11May 10, 2021 21:24506,2632,545,495,0922,480,687,16302,207,744
12May 10, 2021 21:24506,3102,540,618,5302,480,917,23302,203,648
13May 10, 2021 21:24506,3922,545,056,1812,481,322,15902,203,648
14May 10, 2021 21:24506,4062,549,625,7212,481,389,49802,191,360
15May 10, 2021 21:25506,5942,534,373,2592,482,310,20702,203,648
16May 10, 2021 21:25506,7502,543,711,8002,483,077,35302,191,360
17May 10, 2021 21:25506,8552,557,186,1892,483,588,28702,207,744
18May 10, 2021 21:24507,4212,535,799,3722,486,360,71702,203,648