【題目敘述】https://zerojudge.tw/ShowProblem?problemid=c222
【解題想法】
- 加法進位時不補 1 到下一位,亦即兩個數字進行bitwise XOR
#include <iostream>
using namespace std;
int main() {
int n1, n2;
while (cin >> n1 >> n2){
cout << (n1 ^ n2) << "\n";
}
return 0;
}