题意:

输入两组,每组三个非负整数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. 洛谷 P3805【模板】manacher算法

    题目链接:https://www.luogu.com.cn/problem/P3805 Manacher算法$O(n)$: 求以每个字符为中心的最长回文串的半径:如果要求可以以字符间隙为回文中心,就要 ...

  2. threading 官方 线程对象和锁对象以及条件对象condition

    官方地址:https://docs.python.org/2/library/threading.html#thread-objects 以下只截取condition部分,其他Lock()以及thre ...

  3. docker镜像 - 下载、创建镜像和导入导出镜像

    实验环境 CentOS 7.5 安装并启动docker yum install -y docker systemctl start docker 镜像 安装镜像 docker pull [OPTION ...

  4. 对象析构谈—— delete this 的使用及注意事项

    this对象是必须是用 new操作符分配的(而不是用new[],也不是用placement new,也不是局部对象,也不是global对象): delete this后,不能访问该对象任何的成员变量及 ...

  5. Loading class `com.mysql.jdbc.Driver'. This is deprecated

    注意mysql的版本,pom.xml里面的版本.External Librarlies里面的mysql版本.application.properties版本都要检查 有时候还会报 Invalid bo ...

  6. AcWing 838. 堆排序

    #include <iostream> #include <algorithm> using namespace std; ; int n, m; int h[N], size ...

  7. 生成树计数 lighting 最终决定用这个模板! (有逆元的模板)

    #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> # ...

  8. Bash Game hdu 1846

    (一)巴什博奕(Bash Game):只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个.最后取光者得胜. 显然,如果n=m+1,那么由于一次最多只能取m个,所以,无论先取者 ...

  9. supervisor的使用点滴

    supervisor的安装 pip install supervisor 安装成功后步骤 1.创建配置文件 echo_supervisord_conf  > /etc/supervisord.c ...

  10. Atcoder Beginner Contest151D(迷宫问题求任意两点最短路径的最大值,BFS)

    BFS可以求得最短路,DFS会找到从当前点到图中叶子结点的路径. #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using na ...