16进制的简单运算
329+482318be+67844ae1-3d6c
441141001026565
看到这题泪奔了,我竟然还用string类存..my god!simple!人类总是爱把简单的东西复杂化…
01#include<stdio.h>02int main()03{04int n,i,j;05char ch;06scanf("%d",&n);07while(n--)08{09scanf("%x%c%x",&i,&ch,&j);10if(ch=='+') printf("%o\n",i+j);11else printf("%o\n",i-j);12}13return 0;14}原创文章,转载请注明: 转载自ACM解题报告
本文链接地址: 16进制的简单运算
This entry was posted in acm水题 and tagged Water by admin. Bookmark the permalink.