This problem is in Contest(s) below:
Contest 1082:数论入门
Contest 1281:数论入门
Contest 1174:数论入门
Contest 1212:递归基础
Contest 1379:递归基础入门
Contest 1428:YC-递归深搜复习
Contest 1448:11,12月初一训练
Contest 1184:队列,单调队列
Contest 1115:历年NOIP真题
Contest 1342:数论的题