ZOJ 1337 Pi

来源:互联网 发布:徐州淘宝村 编辑:程序博客网 时间:2024/04/26 05:31

        题目稍微有点长,很多废话,题目的意思就是根据一个数论的定理求PI的近似值,定理如下:

 

        Given any pair of whole numbers chosen from a large, random collection of numbers, the probability that the two numbers have no common factor other than one (1) is 6/Pi^2.

 

        其实吧 ,我感觉这个定理挺神奇的,通过随即产生的数就求出pi的近似值;

        理解了题意,就好做了.