http://acm.hust.edu.cn/vjudge/contest/view.action?cid=44588#problem/C First,get B=C/A and if C mod A!=0, then print "NO SOLLUTION" then while gcd(A,B)!=1,let B*=gcd and A/=gcd and finally you'll get B.
The reason is through this process, you do a operation that like get LCM but it's reverse.







