#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. JS 代码调试经验总结(菜鸟必读)

    前言:不知不觉写了很多,希望你能耐心看完这篇文章 任何一个编程者都少不了要去调试代码,不管你是高手还是菜鸟,调试程序都是一项必不可少的工作.一般来说调试程序是在编写代码之后或测试期修改Bug 时进行的 ...

  2. CKEditor + CKFinder 实现编辑上传图片配置

    下载最新版 ckfinder 本人下载的php版本 https://cksource.com/ckfinder/download 下载最新版ckeditor http://ckeditor.com/ ...

  3. Java学习之ThreadLocal

    转自:http://www.cnblogs.com/doit8791/p/4093808.html#3197185 在同步机制中,通过对象的锁机制保证同一时间只有一个线程访问变量.这时该变量是多个线程 ...

  4. CSS截取字符串

    /*溢出的字...处理*/ .updatecsssubstring { text-overflow: ellipsis; -o-text-overflow: ellipsis; white-space ...

  5. XmlDocument加载有Xmlns的xml文档,使用Xpath

    using System; using System.IO; using System.Xml; public class Sample { public static void Main() { X ...

  6. flume 日志采集工具

    Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集.聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据:同时,Flume提供对数据进行简单处理,并 ...

  7. JAVA FILE or I/O学习 - 补充CopyFiles功能

    public class CopyFiles { public static void main(String[] args) { CopyFiles copyFiles = new CopyFile ...

  8. GitHub Linux下使用方法

    1. 在网站注册帐号,创建工程 test 进入工程,右下角会有一个项目仓库的地址.https://github.com/braverior/test.git 2.Linux下 安装github sud ...

  9. 【从零学习Python】Ubuntu14.10下Python开发环境配置

    1. 前言 近期在研究计算机视觉的一些算法,也刚開始接触linux,试着在ubuntu下用qt+openCV进行开发,感觉还行.可是Python作为在学术领域广为应用的高级解释性语言.其在计算机视觉的 ...

  10. 史上最简单的Hibernate入门简单介绍

    事实上Hibernate本身是个独立的框架,它不须要不论什么web server或application server的支持.然而,大多数的Hibernate入门介绍都加入了非常多非Hibernate ...