#五福用数字1,2,3,4,5代替,时间考虑整数
import time
from random import*
c=[]
d=[1,2,3,4,5]
a=time.time()
while True:
i=str(randrange(1,6))
p=str(randrange(1,6))
c.append(i)
c.append(p)
time.sleep(10)
c.sort()
e=[False for h in c if h not in d]
if e:
b=time.time()
print("五福到!您用了",round(b-a),"秒")
break
集五福
最新推荐文章于 2024-03-13 21:31:26 发布