This problem is in Contest(s) below:
Contest 1053:2022-WE 百题大战03:分支结构
Contest 1039:Python程序设计大赛热身练习