参考代码:
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int res = 2; while(!(a % res == b % res && b % res == c % res)) res++; System.out.print(res); } }
0.0分
5 人评分