This problem is in Contest(s) below:
Contest 1158:函数入门
Contest 1155:2024秋季基础班作业