diff --git a/lottery.py b/lottery.py index cd198a4..8fc2d7f 100644 --- a/lottery.py +++ b/lottery.py @@ -181,7 +181,7 @@ def get_interactive_input(): last_floor = input("请输入参与抽奖的最后楼层(可选,直接回车使用所有楼层): ") if last_floor: - if not last_floor.isdigit() or int(last_floor) < 0: + if not last_floor.isdigit() or int(last_floor) < 1: print("错误: 最后楼层必须为大于0的整数") continue last_floor = int(last_floor)