GCD and LCM
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)
Total Submission(s): 3104 Accepted Submission(s): 1357
Problem Description
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 divisor of x, y and z, while lcm(x, y, z) means the least common multiple of x, y and z.
Note 2, (1, 2, 3) and (1, 3, 2) are two different solutions.
Input
First line comes an integer T (T <= 12), telling the number of test cases.

给定两个正整数G和L,找出满足gcd(x, y, z) = G和lcm(x, y, z) = L的三元组(x, y, z)的解的数量。解题策略涉及质因数分解和使用乘法原理或容斥原理计算方案数。"
102680831,9097419,使用IntelliJ IDEA搭建Scala项目,"['Scala', 'IDEA', '项目创建', '编程入门']

156

被折叠的 条评论
为什么被折叠?



