import random
ans = random.randint(1, 100)
b = 0
while True:
a = int(input('请输入一个1~100的整数。'))
if (a > ans):
print('猜大了。')
b += 1
if (a < ans):
print('猜小了。')
b += 1
if (a == ans):
print('恭喜你!中了100亿。')
break
if (b == 8):
print('猜数结束,正确答案是,', ans, ',你错过了100亿!', sep = '')
break