#P4213. 【模板】杜教筛
【模板】杜教筛
Description
Given a positive integer , compute
Input Format
This problem contains multiple test cases within a single test file.
The first line contains an integer, denoting the number of test cases .
Then lines follow, each containing an integer , representing one query.
Output Format
For each query, output two integers in one line, representing and .
6
1
2
8
13
30
2333
1 1
2 0
22 -2
58 -3
278 -3
1655470 2
Hint
Constraints
For all test cases, it is guaranteed that , .
Translated by ChatGPT 5
京公网安备 11011102002149号