m与n互质即可:http://acm.hdu.edu.cn/showproblem.php?pid=1222 转载于:https://www.cnblogs.com/FCWORLD/archive/2011/04/01/2002695.html