將加運算換成XOR運算即可得解。
C++(0.008)
/*******************************************************/
/* UVa 10469 To Carry or not to Carry */
/* Author: Maplewing [at] knightzone.studio */
/* Version: 2012/11/29 */
/*******************************************************/
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
unsigned int a, b;
while( scanf( "%u%u", &a, &b ) != EOF ){
printf( "%u\n", a^b );
}
return 0;
}