import random
import time
step = 0 # 步数
num = 0 # 次数
while True:
i = random.randint(0, 10)
time.sleep(random.randint(1, 3))
if i == 0:
print('game over')
break
elif i % 5 == 0 or i % 3 == 0 and i != 0:
step += (i * 2)
num += 1
print('步数翻倍,本次跳了%d步,总步数:%d' % (i*2, step))
else:
num += 1
step += i
print('本次跳了%d步,总步数:%d' % (i, step))
print('跳了%d步,跳了%d次' % (step, num))