题意:要你构造一个序列x0,x1,x2,,,,xk其中x0=1,xk=n(一个输入的值),序列满足xi<xi+1且xi整除xi+1,求 输入n后,满足该要求的最长的序列,并有多少条这样的最长序列;; #include #include #include #include #include #include #include #include
分析:将n分解成素数因子乘积的形式,再素数因子指数排列组合一下; 易错点:2^20,以后就写成1<<20;;还要注意提前打好素数表;暴力肯定超时 #include #include #include #include #include #include #include #include