import random
num = random.randint(1,100)
while True:
try:
guess= int(input())
except Exception as e:
print("请输入1~100之间的整数")
continue
if guess > num:
print("没有猜中哦,你输入的数字太大了")
elif guess < num:
print("没有猜中哦,你输入的数字太小了")
else:
print("恭喜你,猜中了!")
break