This problem is in Contest(s) below:
Contest 1809:2023小学组
Contest 1997:贪心练习