摘要:题目:http://acm.timus.ru/problem.aspx?space=1&num=1748题意:求n范围内约数个数最多的那个数。Roughly speaking, for a number to be highly composite it has to have prime factors as small as possible, but not too many of the same. If we decompose a number n in prime factors like this:where are prime, and the exponents a
阅读全文
06 2013 档案
摘要:ural 1091 题目链接: http://acm.timus.ru/problem.aspx?space=1&num=1091题意是从1到n的集合里选出k个数,使得这些数满足gcd大于1解法:因子有2的数: 2,4,6,8,10,12,14.。。因子有3的数:3,6,9,12,15,18,21.。。因子有5的数:5,10,15,18,21,24.。。可以看出这里求出的集合时会有重复的,得去从。可惜没有学过容斥原理。不过解决这题还是没问题的。50以内的素因子有:2, 3, 5, 7, 11, 13, 17, 19, 23只有这些素因子才可能产生集合元素大于2的集合排除重复度为2的集合
阅读全文
浙公网安备 33010602011771号