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 14, 2024 14:48matsuoka-601matsuoka-601Score: 58,615Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 14, 2024 14:4852,557327,019,136257,530,03702,281,472
2Jun 14, 2024 14:4852,561308,605,100257,550,21902,281,472
3Jun 14, 2024 14:4852,565322,524,888257,569,94402,269,184
4Jun 14, 2024 14:4852,573323,002,923257,605,74202,273,280
5Jun 14, 2024 14:4854,020331,512,947264,698,54702,269,184
6Jun 14, 2024 14:4854,769333,690,580268,367,40402,404,352
7Jun 14, 2024 14:4856,838306,439,084276,501,0002,003,0002,293,760
8Jun 14, 2024 14:4856,850312,360,176277,565,0001,002,0002,293,760
9Jun 14, 2024 14:4856,878301,899,760276,704,0001,997,0002,424,832
10Jun 14, 2024 14:4856,879310,048,196275,713,0002,996,0002,293,760
11Jun 14, 2024 14:4856,907309,667,737276,845,0001,998,0002,293,760
12Jun 14, 2024 14:4858,604311,747,573284,160,0003,001,0002,420,736
13Jun 14, 2024 14:4858,615309,573,486284,212,0003,002,0002,293,760
14Jun 14, 2024 14:4858,629311,797,762284,280,0003,002,0002,424,832
15Jun 14, 2024 14:4858,785310,522,713286,047,0002,000,0002,420,736
16Jun 14, 2024 14:4859,062315,866,527287,404,0002,002,0002,293,760
17Jun 14, 2024 14:4859,936324,636,639290,690,0002,996,0002,420,736
18Jun 14, 2024 14:4859,939322,847,104292,701,000998,0002,293,760
19Jun 14, 2024 14:4859,944315,516,221291,730,0001,998,0002,424,832
20Jun 14, 2024 14:4859,962315,554,056291,817,0001,998,0002,428,928
21Jun 14, 2024 14:4859,982321,740,872290,913,0002,999,0002,416,640
22Jun 14, 2024 14:4860,006320,424,746291,028,0003,000,0002,293,760
23Jun 14, 2024 14:4861,867323,869,185300,148,0003,001,0002,441,216
24Jun 14, 2024 14:4863,412335,882,607307,723,0002,997,0002,420,736