This problem is in Contest(s) below:
Contest 1065:2022-WE 百题大战05:简单穷举
Contest 1072:Python初中级-APTIV-B-循环
Contest 1035:Python-第3章-流程控制