import randomfrom time import perf_counternum = eval(input('请输入统计点的总数量:'))hits = 0start = perf_counter()random.seed(123)for i in range(1,num+1): a,b=random.random(),random.random() if pow(a**2+b**2,0.5)<1: hits+=1 else: .
Python
2024-01-22
42 点赞
0 评论
63 浏览