uva 10717: least common multiple bruteforce