1 #include<stdio.h> 2 int main() 3 { 4 __int64 a,b,ans; 5 while(scanf("%I64X%I64X",&a,&b)!=EOF) 6 { 7 ans=a+b; 8 if(ans<0) 9 { 10 printf("-"); 11 ans=-ans; 12 } 13 printf("%I64X\n",ans); 14 } 15 return 0; 16 }
1 #include<stdio.h> 2 int main() 3 { 4 __int64 a,b,ans; 5 while(scanf("%I64X%I64X",&a,&b)!=EOF) 6 { 7 ans=a+b; 8 if(ans<0) 9 { 10 printf("-"); 11 ans=-ans; 12 } 13 printf("%I64X\n",ans); 14 } 15 return 0; 16 }
转载于:https://www.cnblogs.com/M-cag/archive/2012/08/08/2628931.html