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 listAug 1, 2022 09:41Robert BurkeRobert BurkeScore: 61,556Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 1, 2022 09:4159,496357,955,767291,528,13402,170,880
2Aug 1, 2022 09:4159,652350,762,642292,294,91002,179,072
3Aug 1, 2022 09:4161,486325,421,317300,283,0001,000,0002,281,472
4Aug 1, 2022 09:4161,504328,457,484300,370,0001,001,0002,441,216
5Aug 1, 2022 09:4161,518330,145,771300,436,0001,001,0002,445,312
6Aug 1, 2022 09:4161,521327,967,089300,452,0001,001,0002,281,472
7Aug 1, 2022 09:4161,556333,031,202300,628,000998,0002,441,216
8Aug 1, 2022 09:4161,558331,458,928299,636,0001,997,0002,281,472
9Aug 1, 2022 09:4161,669324,620,898301,180,0001,000,0002,445,312
10Aug 1, 2022 09:4161,843327,975,548301,031,0002,000,0002,281,472
11Aug 1, 2022 09:4161,974330,978,444301,675,0001,997,0002,281,472
12Aug 1, 2022 09:4162,325369,420,173305,390,97602,179,072