Tools: generate random number by LCM.