#include <string>
#include <cstdio>
#include <iostream>
using namespace std;
int change(char ch)
{
if(ch<='' && ch>='')
return ch-'';
else
{
ch=toupper(ch);
return ch-'A'+;
}
}
int main()
{
char a[],b[];
int sa,sb,ans;
while (cin>>a>>b)
{
sa=; sb=;
for (int i=; i<strlen(a); i++)
{
sa*=;
sa+=change(a[i]);
}
for (int i=; i<strlen(b); i++)
{
sb*=;
sb+=change(b[i]);
}
printf("%d\n",sa+sb);
}
return ;
}

翻译: hexadecimal number 十六进制数

注意点:字符数组是从0开始的,积累字符转化函数toupper,需要用库string。

HDU 1720 A+B Coming的更多相关文章

  1. HDOJ(HDU) 1720 A+B Coming(进制)

    Problem Description Many classmates said to me that A+B is must needs. If you can't AC this problem, ...

  2. HDU题解索引

    HDU 1000 A + B Problem  I/O HDU 1001 Sum Problem  数学 HDU 1002 A + B Problem II  高精度加法 HDU 1003 Maxsu ...

  3. HDU——PKU题目分类

    HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 ...

  4. hdu 1598 find the most comfortable road(枚举+卡鲁斯卡尔最小生成树)

    find the most comfortable road Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K ...

  5. [转] HDU 题目分类

    转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008 ...

  6. HDU ACM 题目分类

    模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...

  7. HDU 5643 King's Game 打表

    King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...

  8. 转载:hdu 题目分类 (侵删)

    转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...

  9. HDOJ 2111. Saving HDU 贪心 结构体排序

    Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

随机推荐

  1. RPC介绍以及编程

    1 RPC介绍 RPC(Remote Procedure Call Protocol)——远程过程调用协议,它是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协 议. RPC采用客 ...

  2. poj2311

    博弈论——sg,mex sg性质:1.在末态的状态点为N态. 2.P态的下一步有一个是N态 3.N态的下一步全部是P态. 当然这是对于单点一个游戏的情形,也相当于NIM只有一堆石子. mex(mini ...

  3. WPF中常用控件的属性

    Source = new BitmapImage( new Uri( WangCaiConfig.GetCurrentDirectory() + imgStr, UriKind.RelativeOrA ...

  4. Streams Studio配置Build options

    Defining build options You can change the build options of the internal builder for building an SPL ...

  5. Netty4.0学习教程

    http://blog.csdn.net/u013252773/article/details/21046697 一些属性和方法介绍 http://blog.csdn.net/zxhoo/articl ...

  6. python 推导式和迭代器、生成器

    1.常用推导式 推导式是从一个或者多个迭代器快速简洁创建数据结构的一种方法. 1.1 _ 列表推导式 最简单的形式:  [exprssion for item in iterable] 示例:  nu ...

  7. 基于linux c的mysql操作——幼儿园数据管理系统

    上周对于mysql进行了简单的学习,利用c对mysql进行操作,主要用到了以下几个函数: mysql_init(); mysql_real_connect(数据库变量指针,网络地址,用户名,登录密码, ...

  8. “-Xmx1024m -Xms1024m -Xmn512m -Xss256k”——Java运行参数(转)

    JVM的堆的内存, 是通过下面面两个参数控制的 -Xms 最小堆的大小, 也就是当你的虚拟机启动后, 就会分配这么大的堆内存给你 -Xmx 是最大堆的大小 当最小堆占满后,会尝试进行GC,如果GC之后 ...

  9. npm使用教程(未完)

    npm docs 设置镜像站 因为npmjs的官方网站,总会下载比较慢或打不开,所以通常需要设置一下镜像站来更好的安装npm库 npm install --registry http://regist ...

  10. spring+hibernate删除单条记录的几种方法

    spring+hibernate删除单条记录的几种方法