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