#P10090. [ROIR 2022] 幼儿园的新年 (Day 2)
[ROIR 2022] 幼儿园的新年 (Day 2)
Background
Translated and simplified from ROIR 2022 D2T1.
Problem Description
Given three integers , find how many pairs satisfy , , is not , and is divisible by .
Input Format
This problem has multiple test cases. The first line contains an integer , representing the number of test cases.
The next lines each contain one test case: , separated by spaces.
Output Format
For each test case, output one number per line, which is the number of valid pairs.
4
4 2 2
4 4 4
6 5 5
8 13 17
1
6
5
30
Hint
This problem uses bundled testdata.
| Subtask | Points | Special Properties |
|---|---|---|
| and | ||
| and | ||
| and | ||
| and | ||
| and | ||
| and | ||
| No special properties |
For of the testdata, , , and .
Translated by ChatGPT 5