This problem is in Contest(s) below:
Contest 1402:程序设计基础C上机4:函数实例操作-物工B241-B242
Contest 1403:程序设计基础B上机6:函数实例操作-大数据B241-B242
Contest 1354:递归算法