#P8834. Counting Harmonious Pairs
Counting Harmonious Pairs
Counting Harmonious Pairs
You are given (n) students, each having a number (a_i), and a constant (k). A pair of students ((i, j)) (with (i < j)) is called a harmonious pair if (a_i \times a_j \leq k). Your task is to compute the total number of harmonious pairs among these students.
inputFormat
The first line of input contains two integers (n) and (k). The second line contains (n) integers (a_1, a_2, \dots, a_n) separated by spaces.
outputFormat
Output a single integer representing the number of harmonious pairs.
sample
3 6
1 2 3
3
</p>