蓝桥杯 货物摆放

#include<bits/stdc++.h>
using namespace std;
#define re register
#define ull unsigned long long
int main()
{
    ull res,res2;
    ull ct=0;
    ull maxn = 2021041820210418;
    for(re ull i =1;i<=300000;++i)
    {
        if(maxn%i==0)
        {
            res=maxn/i;
            for(re ull j=i;j*j<=res;++j)
            {
                if(res%(j)==0)
                {
                    ull k = res/j;
                    printf("%lld,%lld,%lld\n",i,j,k);
                    //if(k<j) continue;
                    if(i==j==k) ct++;
                    else if((i==j&&j!=k)||(i==k&&i!=j)||(j==k&&j!=i))ct=ct+3;
                    else ct=ct+6;

                }
            }
        }
    }
    printf("%lld",ct);
    return 0;
}
posted @ 2022-06-06 20:35  lishangli  阅读(27)  评论(0)    收藏  举报