【PAT甲级】1058 A+B in Hogwarts (20 分)
题意:
输入两组,每组三个非负整数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 分)的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- PAT甲级:1136 A Delayed Palindrome (20分)
PAT甲级:1136 A Delayed Palindrome (20分) 题干 Look-and-say sequence is a sequence of integers as the foll ...
- 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 ...
- PAT 甲级 1054 The Dominant Color (20 分)
1054 The Dominant Color (20 分) Behind the scenes in the computer's memory, color is always talked ab ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- web开发一些资源的在线引用地址
<!-- Bootstrap --> <link rel="stylesheet" href="https://cdn.bootcss.com/boot ...
- HADOOP_SECURE_DN_USER has been replaced by HDFS_DATANODE_SECURE_USER
这个问题可能是我第一个遇到吧,hadoop启动时WARNING: HADOOP_SECURE_DN_USER has been replaced by HDFS_DATANODE_SECURE_USE ...
- Spring-Aop编程(三)-AspectJ
AspectJ 1. 介绍 AspectJ是一个基于Java语言的AOP框架,Spring2.0以后新增了对AspectJ切点表达式支持,@AspectJ 是AspectJ1.5新增功能,通过JDK5 ...
- List 数据分批入库
直接贴代码,主要运用 List<E> subList(int fromIndex, int toIndex); 把 List 分割 /** * 保存批价结果 * * @param pric ...
- SOCV / POCV 模型 (3)
STA无疑是数字集成电路设计实现方法学中最『漂亮』的模型之一,但是随意着工艺进步,local varition 的随机性及重要性增加,传统STA 的局限性日渐突出.大概在十五年前,SSTA成了一个研究 ...
- c# pcm
using System; using System.IO; using System.Text; using System.Windows.Forms; using System.Runtime.I ...
- Win10上面安装vmware,并在Vmware上面安装Ubuntu
一.安装vmware vmware安装包 链接:https://pan.baidu.com/s/178IOOuMOcotSrr6omIAM_A 提取码:c7ba vmware激活码 链接:https: ...
- CSS3的一个伪类选择器:nth-child()
CSS3的一个伪类选择器“:nth-child()”. Table表格奇偶数行定义样式: 语法: :nth-child(an+b) 为什么选择她,因为我认为,这个选择器是最多学问的一个了.很可惜,据我 ...
- JavaScript自学笔记(1)---表单验证,let和const,JSON文件
今天开个JS自学笔记,本身JS的语法很简单,如果学过Java或者C系的都很容易,就不讨论了.主要是讨论实际应用的问题. 1.表单验证: a.html自动验证: HTML 表单验证可以通过浏览器来自动完 ...
- php常用函数归纳
php常用函数归纳: /** * 截取指定长度的字符 * @param type $string 内容 * @param type $start 开始 * @param type $length 长度 ...