atcoder#ARC160B. [ARC160B] Triple Pair
[ARC160B] Triple Pair
Score : points
Problem Statement
You are given a positive integer .
Find the number, modulo , of triples of positive integers that satisfy the following condition.
- All of , , are less than or equal to .
You have test cases to solve.
Constraints
Input
The input is given from Standard Input in the following format, where represents the -th test case:
Each test case is in the following format:
Output
Print lines. The -th line should contain the answer for the -th test case.
4
1
2
5
998244353
1
4
17
727512986
In the first test case, . There is one triple that satisfies the condition: .
In the second test case, . There are four triples that satisfy the condition: .