
GCD
coldfresh
那我们开始吧
展开
-
Astronomy POJ - 3101(LCM 和DCD)
There are n planets in the planetary system of star X. They orbit star X in circular orbits located in the same plane. Their tangent velocities are constant. Directions of orbiting of all planets are t原创 2017-06-06 11:15:30 · 425 阅读 · 0 评论 -
GCD and LCM HDU - 4497 (唯一分解定理)
Given two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L? Note, gcd(x, y, z) means the greatest common d原创 2017-09-30 20:18:18 · 576 阅读 · 0 评论 -
Sum Of Gcd HDU - 4676(莫队)
Given you a sequence of number a 1, a 2, …, a n, which is a permutation of 1…n. You need to answer some queries, each with the following format: Give you two numbers L, R, you should calculate sum原创 2017-10-20 16:07:59 · 355 阅读 · 0 评论 -
Pagodas HDU - 5512 (数论)
n pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 1 to n. However, only two of them (labelled a and b, where 1≤a≠b≤n) withstood the test ...原创 2018-04-04 17:54:35 · 261 阅读 · 0 评论