1429 - 埃及分数

 

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:宋体;color:black;">古埃及曾经创造出灿烂的人类文明,他们的分数表示却很令人不解。古埃及喜欢把一个分数分解为类似:</span><span style="font-size:24pt;font-family:Arial;color:black;"> 1/a + 1/b </span><span style="font-size:24pt;font-family:宋体;color:black;">的格式。</span>

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:Arial;color:black;"><span>&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:24pt;font-family:宋体;color:black;">这里,</span><span style="font-size:24pt;font-family:Arial;color:black;">a </span><span style="font-size:24pt;font-family:宋体;color:black;">和</span><span style="font-size:24pt;font-family:Arial;color:black;"> b </span><span style="font-size:24pt;font-family:宋体;color:black;">必须是不同的两个整数,分子必须为</span><span style="font-size:24pt;font-family:Arial;color:black;"> 1</span>

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:Arial;color:black;"><span>&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:24pt;font-family:宋体;color:black;">比如,</span><span style="font-size:24pt;font-family:Arial;color:black;">2/15 </span><span style="font-size:24pt;font-family:宋体;color:black;">一共有</span><span style="font-size:24pt;font-family:Arial;color:black;"> 4 </span><span style="font-size:24pt;font-family:宋体;color:black;">种不同的分解法(姑且称为埃及分解法):</span>

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:Arial;color:black;">1/8 + 1/120</span>

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:Arial;color:black;">1/9 + 1/45</span>

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:Arial;color:black;">1/10 + 1/30</span>

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:Arial;color:black;">1/12 + 1/20</span>

<span style="font-size:24pt;"><span>•</span></span><span style="font-size:24pt;font-family:Arial;color:black;"><span>&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:24pt;font-family:宋体;color:black;">那么,</span><span style="font-size:24pt;font-family:Arial;color:black;"> 2/45 </span><span style="font-size:24pt;font-family:宋体;color:black;">一共有多少个不同的埃及分解呢(满足加法交换律的算同种分解)?</span>

<span style="font-size:24pt;font-family:宋体;color:black;">编程输出满足要求的分解数目。</span>

输入

输出

一个整数,表示满足要求的分解数目

样例

输入


                

输出

7

来源

蓝桥杯-历届试题

时间限制 1 秒
内存限制 128 MB
讨论 统计
上一题 下一题