public static int getCM(int m, int n){ for (int i = m ; i <= m * n ; i += m) if (i % n == 0) return i; return 114514; }