33 lines
596 B
C++
33 lines
596 B
C++
#include <iostream>
|
|
using namespace std;
|
|
int su[10]={2,3,5,7,11,13,17,19,23,29};
|
|
int ge[10]={0};
|
|
long long allans,allge=0;
|
|
void doit(int n,int now){
|
|
if(n==1){
|
|
long long ans=1;
|
|
for(int i=0;i<=9;i++){
|
|
ans=ans*(ge[i]+1);
|
|
}
|
|
if(allge<ans){
|
|
allge=ans;
|
|
|
|
}
|
|
return ;
|
|
}
|
|
for(int i=now;i<=9;i++){
|
|
if(n%su[i]==0){
|
|
ge[i]++;
|
|
doit(n/su[i],i);
|
|
ge[i]--;
|
|
}
|
|
}
|
|
}
|
|
int main()
|
|
{
|
|
int n;
|
|
while(cin>>n){
|
|
doit(n,0);
|
|
}
|
|
}
|