1110: 最近共同祖先(函数专题)
import java.util.Scanner;
public class Main {
public static int common(int x,int y){
if(x==y) return x;if(x>y) return common(x/2,y);if(x<y) return common(x,y/2);return x;}public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int x=cin.nextInt();int y=cin.nextInt();System.out.println(common(x,y));}
}