题意:

输入两组,每组三个非负整数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. hive导出数据到本地文件报错解决方法

    报错信息: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to move so ...

  2. opencv:图像边缘发现

    拉普拉斯算子 Mat dst; // ksize 3 ,必须是奇数,不同大小会有不同的效果 Laplacian(src, dst, -1, 3, 1.0, 0, BORDER_DEFAULT); im ...

  3. nfs 动态文件挂载读写权限设置

    nfs 动态文件挂载读写权限设置 待办 ll 命令查看文件夹权限 参考设置共享文件夹https://www.linuxidc.com/Linux/2018-11/155331.htm

  4. 安装rpm包时提示错误:依赖检测失败的解决方法

    安装rpm包时提示错误:依赖检测失败 解决方法: 命令末尾加上--nodeps --force

  5. Java开发中使用模拟接口moco响应中文时乱码

    场景 在开发中需要依赖一些接口,比如需要请求一个返回Json数据的接口,但是返回Json数据的接口要么是没搭建,要么是交互比较复杂. 此时,就可以使用moco来模拟接口返回接口数据,以便开发和测试工作 ...

  6. Web基础了解版08-JSTL-Core标签库

    JSTL JSP为我们提供了可以自定义标签库(Tag Library)的功能,用来替代代码脚本,Sun公司又定义了一套通用的标签库名为JSTL(JSP Standard Tag Library),里面 ...

  7. Jmeter变量嵌套的方法

    jmeter中变量的嵌套一般有两种方式 1,调用__V函数 { "phone": "${phone}", "xxId": "${_ ...

  8. 原生java与js结合

    链接:https://www.jb51.cc/html5/15606.html

  9. nginx 配置Tp5项目时出现 404 Not Found nginx

    1.首先看了nginx报错日志 报 signal process started signal process started表示还有 产生原因 1.可能你的nginx.conf 内容配置的有问题. ...

  10. Python使用Tensorflow出现错误: UserWarning: The default mode, 'constant'

    Python使用Tensorflow出现错误: UserWarning: The default mode, 'constant', will be changed to 'reflect' in s ...