随笔分类 -  数论---唯一分解定理

摘要:UVA.10791 Minimum Sum LCM (唯一分解定理)题意分析也是利用唯一分解定理,但是要注意,分解的时候要循环(sqrt(num+1))次,并要对最后的num结果进行判断。代码总览#include #include #include #include #define ... 阅读全文
posted @ 2017-08-10 09:12 pengwill 阅读(133) 评论(0) 推荐(0)
摘要:UVA.10375 Choose and divide (唯一分解定理)题意分析首先写出组合数的公式,然后利用唯一分解定理分解每一项,若是在分子,则加一,在分母减一,最后根据分解的结果计算即可。代码总览#include #include #include #include #inc... 阅读全文
posted @ 2017-08-10 09:09 pengwill 阅读(129) 评论(0) 推荐(0)