【发布时间】:2018-11-28 21:25:18
【问题描述】:
我需要打印互质数对 (a,b) 的数量,0 http://mathworld.wolfram.com/CarefreeCouple.html
但是程序没有我预期的那么快。 我听说过一种通过使用称为“Farey 序列”的东西来解决这个问题的有效方法,但是代码是用 PHP 编写的,我只能理解 C。
那么哪种方法可以帮助我解决问题呢?谢谢你的时间。
【问题讨论】:
标签: primes greatest-common-divisor