#K33137. Special Pairs Count

    ID: 25021 Type: Default 1000ms 256MiB

Special Pairs Count

Special Pairs Count

Given a positive integer \(n\), count the number of ordered pairs \((a, b)\) where \(1 \le a, b \le n\) that satisfy the following condition:

  • If \(a = b\), the pair is automatically valid.
  • If \(a \neq b\), then the pair is valid if the least common multiple (\(\mathrm{lcm}(a, b)\)) is equal to \(a+b\), i.e., $$\mathrm{lcm}(a, b) = a+b.$$

You are given \(T\) test cases. For each test case, compute and output the count of valid pairs.

inputFormat

The first line contains an integer \(T\) representing the number of test cases. Each of the following \(T\) lines contains a single integer \(n\) (\(1 \le n\le \text{small upper bound}\)), where \(n\) defines the range \([1, n]\) for both \(a\) and \(b\).

outputFormat

For each test case, print the count of valid pairs \((a, b)\) on a new line.

## sample
1
1
1

</p>