This problem is in Contest(s) below:
Contest 1045:数学数论1
Contest 1359:2024暑期37下c++2(平阳)
Contest 1224:2023春周日晚C++二期(快)
Contest 1379:2024秋周日晚c1
Contest 1370:2024秋周六下c1