原文连接:(7条消息) 将真分数分解为埃及分数_且_听_风_吟的博客-CSDN博客
1 a,b = 8,11 2 a = a * 10 3 b = b * 10 4 res = [] 5 while a: 6 for i in range(a,0,-1): 7 print(i,b) 8 if(b % i == 0): 9 print(i,b,a,res) 10 res.append('1' + '/' + str(int(b / i))) 11 a = a - i 12 break 13 print('+'.join(res))
标签:分数,10,真分数,res,print,HJ82 From: https://www.cnblogs.com/tanyuanqing/p/17279058.html