题意:

输入两组,每组三个非负整数A,B,C(A<=1e7,B<17,C<29),输出相加的和。(类似个位上29进制,十位上17进制运算)

AAAAAccepted code:

 #define HAVE_STRUCT_TIMESPEC
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a,b,c,d,e,f;
char s,ss,sss,ssss;
cin>>a;
cin>>s;
cin>>b;
cin>>ss;
cin>>c;
cin>>d;
cin>>sss;
cin>>e;
cin>>ssss;
cin>>f;
int x=c+f,y=b+e,z=a+d;
if(x>)
x-=,++y;
if(y>)
y-=,++z;
cout<<z<<"."<<y<<"."<<x;
return ;
}

【PAT甲级】1058 A+B in Hogwarts (20 分)的更多相关文章

  1. PAT 甲级 1058 A+B in Hogwarts (20 分) (简单题)

    1058 A+B in Hogwarts (20 分)   If you are a fan of Harry Potter, you would know the world of magic ha ...

  2. PAT Advanced 1058 A+B in Hogwarts (20 分)

    If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- a ...

  3. 1058 A+B in Hogwarts (20分)

    1058 A+B in Hogwarts (20分) 题目: If you are a fan of Harry Potter, you would know the world of magic h ...

  4. PAT甲级:1136 A Delayed Palindrome (20分)

    PAT甲级:1136 A Delayed Palindrome (20分) 题干 Look-and-say sequence is a sequence of integers as the foll ...

  5. PAT甲级——1058 A+B in Hogwarts

    1058 A+B in Hogwarts If you are a fan of Harry Potter, you would know the world of magic has its own ...

  6. PAT 甲级 1054 The Dominant Color (20 分)

    1054 The Dominant Color (20 分) Behind the scenes in the computer's memory, color is always talked ab ...

  7. PAT 甲级 1027 Colors in Mars (20 分)

    1027 Colors in Mars (20 分) People in Mars represent the colors in their computers in a similar way a ...

  8. PAT 甲级 1005 Spell It Right (20 分)

    1005 Spell It Right (20 分) Given a non-negative integer N, your task is to compute the sum of all th ...

  9. PAT 甲级 1031 Hello World for U (20 分)(一开始没看懂题意)

    1031 Hello World for U (20 分)   Given any string of N (≥) characters, you are asked to form the char ...

  10. PAT 甲级 1023 Have Fun with Numbers (20 分)(permutation是全排列题目没读懂)

    1023 Have Fun with Numbers (20 分)   Notice that the number 123456789 is a 9-digit number consisting ...

随机推荐

  1. [MongoDB]MongoDB分页显示

    MongoDB Limit与Skip方法配合进行分页MongoDB Limit() 方法如果你需要在MongoDB中读取指定数量的数据记录,可以使用MongoDB的Limit方法,limit()方法接 ...

  2. Qt入门-表格类QTableWidget

    原文 :http://blog.csdn.net/xgbing/article/details/7774737 表格是GUI中常用的控件,在Qt中,常用的表格类是QTableWidget. 示例: Q ...

  3. 从相亲的角度理解 K8S 的 Node Affinity, Taints 与 Tolerations

    这是昨天晚上阅读园子里的2篇 k8s 博文时产生的想法,在随笔中记录一下. 这2篇博文是 K8S调度之节点亲和性 与 K8S调度之Taints and Tolerations . 如果我们把 node ...

  4. 1.3 eclipse快捷键

    来源:http://blog.csdn.net/dashuxiaoai/article/details/8737928 另:Eclipse快捷键 10个最有用的快捷键  http://www.cnbl ...

  5. 【 SSH 配置参考】

    applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xm ...

  6. 寒假安卓app开发学习记录(4)

    今天的任务第一个项目运行并部署.没想到第一个环节就出现了错误,运行之后eclipse报错:Errors occurred during the build.Errors running builder ...

  7. Angular 调用百度地图API接口

    Angular 调用百度地图API接口 参考原文:https://blog.csdn.net/yuyinghua0302/article/details/80624274 下面简单介绍一下如何在Ang ...

  8. DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL 未能在“xmlhttpRequest”上执行“open”:无效的URL。

    出现这个报错主要是baseurl:http://192.168.*.*/后面的(/)或是请求里面的url:/user/login中前面的(/)有一个漏掉了,导致合成的路径不完整,所以报错:无效的URL

  9. Django 创建app 应用,数据库配置

    一.create project mkdir jango cd jango 目录创建project myapp django-admin startproject myapp 2.在给project创 ...

  10. npm报错This is probably not a problem with npm. There is likely additional logging

    使用webstorm开发时,遇到npm 报错,于是尝试了如下所有的方法,不完全统计. https://blog.csdn.net/liu305088020/article/details/791823 ...