使用线性筛的做法 目前题解中没有
https://www.luogu.com.cn/blog/crsuh2er0/csp-j-2023-t3-solution
另外 O(Tn^2)能过?
https://www.luogu.com.cn/record/132433820
建议加强数据
https://www.luogu.com.cn/problem/U375340