This problem is in Contest(s) below:
Contest 1067:2023-WE 百题大战07:函数+循环威力大
Contest 1038:Python-第6章-函数