25.蓝桥杯2013第七题核桃的数量

2018-03-31  本文已影响0人  FiveZM

/**

*/

package 第四届;

import java.util.Scanner;


public class A7 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        for (int i = 1; i < 500; i++) {
            if (i % a == 0 && i % b == 0 && i % c == 0) {
                System.out.println(i);
                  return;
            }

        }
    }

}

上一篇 下一篇

猜你喜欢

热点阅读