The number of divisors(约数) about Humble Numbers--hdu1492

http://acm.hdu.edu.cn/showproblem.php?pid=1492

题目大意:  给你一个n    这个n呢  他的素因子只有2 3 5 7 这四个数   没有其他的素因子   求他的因子数   n是2的64次方

分析  :  只求出他的素因子的个数  每一个加一  相乘就行

#include<cstdio>
#include<cstring>
#include<stack>
#include<vector>
#include<queue>
#include<cmath>
#include<cstdlib>
#include<iostream>
#include<algorithm>
using namespace std;

#define N 30
#define memset(a,b) memset(a,b,sizeof(a))

int a[N];

void serch(long long int n)
{
    memset(a,0);
    int i=0;
    int b[4]={2,3,5,7};
    while(n!=1)
    {
        if(n%b[i]==0)
        {
            a[b[i]]++;
            n=n/b[i];
        }
        else
        {
            i++;
        }
    }
}

int main()
{
    long long int n;
    while(scanf("%lld",&n),n)
    {
        serch(n);
        long long int sum=(a[2]+1)*(a[3]+1)*(a[5]+1)*(a[7]+1);
        printf("%lld
",sum);
    }
    return 0;
}