1722nbsp专题

HDOJnbsp;nbsp;1722nbsp;nbsp;nbsp;nbsp;Cake

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1722 题目分析:假设Q>P;先分Q份,取出P份(已分好),再将剩下的(Q-P)份看做一块蛋糕,要分给(Q-P)与P人,一直这样往下分,直到(Q-P)等于1时将蛋糕分为P快就可以,然后将所有的加在一起     #include <stdio.h> #include <math.h> int gcd(in