标签:style blog io color ar os sp div on
3
29+4823
18be+6784
4ae1-3d6c
44114
100102
6565
1 #include <stdio.h> 2 3 int main(){ 4 int a; 5 int b; 6 int sum; 7 int T; 8 char c; 9 10 scanf("%d",&T); 11 12 while(T--){ 13 scanf("%x%c%x",&a,&c,&b); 14 15 if(c==‘+‘) 16 sum=a+b; 17 18 else 19 sum=a-b; 20 21 if(sum<0){ //只有当sum为__int64类型时,才要进行正负的判断 22 sum=-sum; 23 printf("-"); 24 } 25 26 printf("%o\n",sum); 27 } 28 29 30 31 return 0; 32 }
标签:style blog io color ar os sp div on
原文地址:http://www.cnblogs.com/zqxLonely/p/4099216.html