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 19, 2021 23:25Yuriy LyfenkoYuriy LyfenkoScore: 281,372Success
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:25233,3261,207,368,6261,143,298,02502,232,320
2May 19, 2021 23:24233,8551,204,455,9781,145,889,68802,232,320
3May 19, 2021 23:24234,4241,216,412,7391,148,679,24902,240,512
4May 19, 2021 23:24235,0451,220,404,0671,151,720,35902,224,128
5May 19, 2021 23:25235,5921,211,857,1051,154,401,44402,232,320
6May 19, 2021 23:25242,1131,250,456,7931,186,353,50902,232,320
7May 19, 2021 23:25280,9951,435,442,1071,376,876,66702,232,320
8May 19, 2021 23:25281,0191,440,033,6021,376,992,13702,232,320
9May 19, 2021 23:25281,0801,439,527,4161,377,290,14702,240,512
10May 19, 2021 23:24281,3721,440,759,3201,378,721,66202,236,416
11May 19, 2021 23:24281,5041,443,893,7871,379,370,90602,244,608
12May 19, 2021 23:25281,6201,436,842,8881,379,938,32602,252,800
13May 19, 2021 23:24281,9021,442,980,9131,381,319,61602,236,416
14May 19, 2021 23:25282,0931,439,678,4421,382,255,97302,232,320
15May 19, 2021 23:24282,5481,447,907,7981,384,483,07502,232,320
16May 19, 2021 23:24282,7701,456,790,6731,385,572,71802,244,608
17May 19, 2021 23:25283,0561,456,570,2091,386,975,01402,236,416
18May 19, 2021 23:24285,4551,473,623,9941,398,729,74402,236,416