a+b

 1 import java.io.*;
 2 import java.util.*;
 3 
 4 public class Main{
 5 
 6     public static void main(String[] args) {
 7         Scanner in = new Scanner(System.in);
 8         int a = in.nextInt();
 9         int b = in.nextInt();
10 
11         while(a != 0) {
12             int temp = a & b < 1;
13             b = a ^ b;
14             a = temp;
15         }
16 
17         System.out.println(b);
18     }
19 }

 

posted on 2018-08-30 09:47  爱养花的码农  阅读(272)  评论(0编辑  收藏  举报