hdu2057
来源:互联网 发布:linux搭建web邮件系统 编辑:程序博客网 时间:2024/06/08 00:21
There must be many A + B problems in our HDOJ , now a new one is coming.
Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal too.
Easy ? AC it !
Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal too.
Easy ? AC it !
Each case consists of two hexadecimal integers A and B in a line seperated by a blank.
The length of A and B is less than 15.
+A -A+1A 121A -9-1A -121A -AA
02C11-2C-90
#include <iostream>#include <cstdio>using namespace std;int main(){ __int64 a, b, sum; //__int64最大能表示16位16进制 while(scanf("%I64X%I64X", &a, &b) != EOF){ sum = a + b; if(sum < 0) printf("-%I64X\n", -sum); //16进制表示负数的时候是补码所以要注意 else printf("%I64X\n", sum); } return 0;}
0 0
- HDU2057
- hdu2057
- hdu2057 A + B Again
- hdu2057 A + B Again
- HDU2057 A + B Again
- hdu2057 A + B Again
- HDU2057 递推
- hdu2057 A + B Again
- HDU2057 A + B Again
- hdu2057 A + B Again
- HDU2057 A+B Again
- hdu2057 A + B Again
- HDU2057 A + B Again
- HDU2057 A + B Again【水题】
- hdu2057-进制转换问题
- HDU2057 A + B Again【水题】
- hdu2057(16进制的输入输出)
- HDU2057 A+B again 十六进制加法
- HTML5/jQuery动画应用 3D视觉效果
- 精妙无比 8款HTML5动画实例及源码
- 16款最佳HTML5超酷动画演示及源码
- java枚举类Enum简洁
- 炫酷实用的jQuery插件 涵盖菜单、按钮、图片
- hdu2057
- 华丽的HTML5/jQuery动画和应用 前端必备
- 让人心动的jQuery插件和HTML5动画
- 8个WEB前端创意HTML5动画应用精选
- 7款超酷HTML5 3D动画精选应用及源码
- 2、Java并发机制的底层实现原理
- 类方法和实例方法
- 分享web前端七款HTML5 Loading动画特效集锦
- 8个web前端的精美HTML5 & CSS3效果及源码下载