Yet Another Query Problem!

For third query, there are total 5 numbers in the range [1, 10] which is divisible by 2 (2, 4, 6, 8, 10). And all subsequence of length 2 are (2, 4), (2, 6), (2, 8), (2, 10), (4, 6), (4, 8), (4, 10), (6, 8), (6, 10), (8, 10)


This is a companion discussion topic for the original entry at https://toph.co/p/yet-another-query-problem