HDU2057 递推
来源:互联网 发布:后缀slg3是什么软件 编辑:程序博客网 时间:2024/05/29 08:55
A + B Again
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21927 Accepted Submission(s): 9477
Problem Description
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 !
Input
The input contains several test cases, please process to the end of the file.
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.
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.
Output
For each test case,print the sum of A and B in hexadecimal in one line.
Sample Input
+A -A+1A 121A -9-1A -121A -AA
Sample Output
16进制的运算,脑子抽风了居然想要换回10进制算完了再返回去,结果忘了语言自带的进制
02C11-2C-90
16进制的运算,脑子抽风了居然想要换回10进制算完了再返回去,结果忘了语言自带的进制
#include<stdio.h>int main(){__int64 m, n;while (~scanf("%I64X%I64X", &m, &n)){m = m + n;if (m<0){ m = -m; printf("-%I64X\n", m); }else printf("%I64X\n", m);}
0 0
- HDU2057 递推
- HDU2057
- 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 A+B Again
- hdu2057 A + B Again
- HDU2057 A + B Again
- 递推
- 递推
- 递推
- 递推
- 递推
- Visual studio 2010 部分常用快捷键
- [一起学Hive]之十九-使用Hive API分析HQL的执行计划、Job数量和表的血缘关系
- c++作业4
- C++程序设计必知:作用域和可见性
- 查找进程然后删除
- HDU2057 递推
- 前缓冲区渲染
- C++第五次作业
- An internal error occurred during: "Build Project". GC overhead limit exceeded
- 关于linux用户权限的一些管理
- [一起学Hive]之二十-自定义HiveServer2的用户安全认证
- 26. Remove Duplicates from Sorted Array
- 基于支持向量机(SVM)的人脸识别
- 第一章 大型网站架构演化[手工敲录]