摘要:
1 count = 0 2 def hanoi(n, src, dst, mid): 3 global count 4 if n == 1: 5 print("{}:{}->{}".format(1,src,dst)) 6 count += 1 7 else : 8 hanoi(n-1, src, 阅读全文
摘要:
1 import time 2 from random import random 3 DARTS = 1000*1000 4 hits = 0.0 5 for i in range(1, DARTS+1): 6 x, y = random(), random() 7 dist = pow(x ** 阅读全文