整數因子分解問題

2021-09-29 21:34:03 字數 715 閱讀 3600

time limit: 1000 ms memory limit: 65536 kib

submit

statistic

problem 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

輸入資料只有一行,有1個正整數n (1≤n≤2000000000)。

output

將計算出的不同的分解式數輸出。

sample input

12
sample output

8
#includeusing namespace std;

int dp[100000001] = ;

int a[100000001];

int k = 0;

void uml(int n)

}if(i * i == n)

}void jisuan()}}

}int main(void)

整數因子分解問題

problem 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共有多少種不同的...

整數因子分解問題

home contests experiments problems status ranklist logout 整數因子分解問題 time limit 1000 ms memory limit 65536 kib submit statistic problem description 大於1的...

整數因子分解問題

time limit 1000 ms memory limit 65536 kib submit statistic problem description 大於1的正整數n可以分解為 n x1 x2 xm。例如,當n 12 時,共有8 種不同的分解式 12 12 12 6 2 12 4 3 12 ...