标签:exti java imp more 最小 osi text time roman
///@author Sycamore, ZJNU ///@date 8/2/2017import java.util.*;public class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int a = scanner.nextInt(), b = scanner.nextInt(); System.out.println(lcm(a, b)); } scanner.close(); } public static int gcd(int a, int b) { while (b != 0) { int t = a%b; a = b; b = t; } return a; } public static int lcm(int a, int b) { return a / gcd(a, b)*b; } }
标签:exti java imp more 最小 osi text time roman
原文地址:http://www.cnblogs.com/zjnu/p/7277355.html