xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

Description 大于1的正整數 n 都可以分解為 n = x1 * x2 * ... * xm 例如:當n=12時,共有8種不同的分解式: 12 = 12 12 = 6*2 12 = 4*3 12 = 3*4 12 = 3*2*2 12 = 2*6 12 = 2*3*2 12 = 2*2*3 對于給定正整數n,計算n共有多少種不同的分解式。 Input 第一行一個正整數n (1<=n<=1000000) Output 不同的分解式數目 Sample Input 12 Sample Output 8 Hint 此題因子講順序的.第一個因子可能是2~n之間的數.

資源截圖

代碼片段和文件信息

#include
using?namespace?std;

int?num=0;
void?f(int?m)
{
if(m==1)
num++;
else
for(int?i=m;i>=2;i--)
if(m%i==0)
f(m/i);
}

int?main()
{
int?n;
cin>>n;
f(n);
cout< return?0;
}

????
????????tle>未將對象引用設置到對象的實例。tle>
????????ta?name=“viewport“?content=“width=device-width“?/>
????????yle>
?????????body?{font-family:“Verdana“;font-weight:normal;font-size:?.7em;color:black;}?
?????????p?{font-family:“Verdana“;font-weight:normal;color:black;margin-top:?-5px}
?????????b?{font-family:“Verdana“;font-weight:bold;color:black;margin-top:?-5px}
?????????H1?{?font-family:“Verdana“;font-weight:normal;font-size:18pt;color:red?}
?????????H2?{?font-family:“Verdana“;font-weight:normal;font-size:14pt;color:maroo

評論

共有 條評論

相關資源