LightOJ1341 Aladdin and the Flying Carpet】的更多相关文章

题目链接:https://vjudge.net/problem/LightOJ-1341 1341 - Aladdin and the Flying Carpet    PDF (English) Statistics Forum Time Limit: 3 second(s) Memory Limit: 32 MB It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which…
题目链接:https://cn.vjudge.net/problem/LightOJ-1341 题意 给出一个长方形的面积a 让你算整数边长的可能取值,并且两个边都大于给定数字b 思路 唯一分解定理:$ n=\prod p_i^{a_i} $ 首先考虑分解质因数的复杂度$ O(\sum a_i) $,不会算-_- 然后尝试用试除法做这个 简单算了下复杂度,大概一共4×10^9个循环 最后也就试一试,不出意料超时 然后试图用筛法降低复杂度,等到交了才发现常数降了.复杂度是没降-_- 最后的最后还是…
题意 给一对数字 a,b ,a是一个长方形的面积,问有多少种整数的边的组合可以组成面积为a的长方形,要求最短的边不得小于b 数据组数T<=4000, a,b<=10^12 Solution 暴力求肯定TLE 想想唯一分解定理: \(X=\Pi_i^{P_i|X} P_i^{a_i}\) 则X的正因数个数为\(\Pi_i(a_i + 1)\) 因为题目中要求的是长方形,且最短边大于b 那么a / b < b时输出0就好,否则将A分解,求出它的约数个数. 又因为求出来的约数对数是无序的,所以…
http://lightoj.com/volume_showproblem.php?problem=1341 Aladdin and the Flying Carpet Time Limit:3000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Submit Status Practice LightOJ 1341 Description It's said that Aladdin had to solve seven…
Aladdin and the Flying Carpet https://cn.vjudge.net/contest/288520#problem/C It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first mystery. Aladdin wa…
/** 题目:C - Aladdin and the Flying Carpet 链接:https://vjudge.net/contest/154246#problem/C 题意:有多少种长方形满足面积为a,且最短边>=b:长方形边长为整数,且一定不可以是正方形. 思路:求出a的素因子以及每个素因子的个数,然后搜索所有满足条件的方法数. 其实可以求出所有<b的方法数,用总的减去它,可以更快,不过更麻烦. */ #include<bits/stdc++.h> using names…
Aladdin and the Flying Carpet (LightOJ - 1341)[简单数论][算术基本定理][分解质因数](未完成) 标签:入门讲座题解 数论 题目描述 It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first myste…
It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first mystery. Aladdin was about to enter to a magical cave, led by the evil sorcerer who disguised hi…
It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first mystery. Aladdin was about to enter to a magical cave, led by the evil sorcerer who disguised hi…
题目链接: https://vjudge.net/problem/LightOJ-1341 题目描述: 问有几种边长为整数的矩形面积等于a,且矩形的短边不小于b 算数基本定理的知识点:https://baike.baidu.com/item/%E7%AE%97%E6%9C%AF%E5%9F%BA%E6%9C%AC%E5%AE%9A%E7%90%86/10920095?fr=aladdin #include<cstdio> #include<vector> #include<c…