给出a,c,问是否存在一个尽可能小的数b使得lcm(a, b) == c 因为a*b/gcd(a, b) = lcm(a, b) 所以c/a = b/gcd(a, b) 而我们要求的是b,所以可以枚举b/gcd(a, b)的倍数直到c 这个过程中第一个满足条件的数就是b 代码如下: #include <cstdio>#include <iostream>#include <al
原题: Recently Yaghoub is playing a new trick to sell some more. When somebody gives him A Tomans, he who never has appropriate changes, asks for B Tomans such that lowest common multiple of A and B eq