#include <iostream>

using namespace std;
int ag,as,ak;
int bg,bs,bk;
int cg,cs,ck;
int main(){
scanf("%d.%d.%d",&ag,&as,&ak);
scanf("%d.%d.%d",&bg,&bs,&bk);
int c1=(ak+bk)/29;
ck=(ak+bk)%29;
int c2=(as+bs+c1)/17;
cs=(as+bs+c1)%17;
cg=ag+bg+c2;
printf("%d.%d.%d",cg,cs,ck);
return 0;
}

PAT1058. A+B in Hogwarts (20)的更多相关文章

  1. PAT1058:A+B in Hogwarts

    1058. A+B in Hogwarts (20) 时间限制 50 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue If you ...

  2. A1058 A+B in Hogwarts (20)(20 分)

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

  3. 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 ...

  4. 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 ...

  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 ow ...

  6. 1058 A+B in Hogwarts (20)

    #include <stdio.h> int main() { ]; ]; ],&ans1[],&ans1[],&ans2[],&ans2[],&a ...

  7. PAT (Advanced Level) 1058. A+B in Hogwarts (20)

    简单题. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #in ...

  8. PAT甲题题解-1058. A+B in Hogwarts (20)-大水题

    无语,这种水题还出,浪费时间,但又不得不A... #include <iostream> #include <cstdio> #include <algorithm> ...

  9. PAT A1058 A+B in Hogwarts (20)

    AC代码 #include <cstdio> struct Money { long long Galleon, Sicklke, Knut; }A, B, Sum; void init( ...

随机推荐

  1. iOS-ASIHTTPRequest框架学习

    本文转载至 http://www.cnblogs.com/A-Long-Way-Chris/p/3539679.html 前段时间在公司的产品中支持了够快网盘,用于云盘存储. 在这个过程中,学习到了很 ...

  2. mysql导出csv文件

    SELECT * FROM (select 'id','url','大分类','分类','贴吧名称','关注用户数','帖子数量','简介','帖子名称','楼主ID','发表时间','采集时间',' ...

  3. VS中没有为此解决方案配置选中要生成的项目

    菜单->生成->配置管理器->给要生成的项目打钩

  4. netty http客户端从web服务器获取消息遇到的HttpChunk问题

    有时候,Web服务器生成HTTP Response是无法在Header就确定消息大小的,这时一般来说服务器将不会提供Content-Length的头信息,而采用Chunked编码动态的提供body内容 ...

  5. 如何转换指定 波长 到 RGB 颜色?

    //指定波长转换成RGBA颜色 std::vector<int> lambdaToColor(double lambda,double gamma = 0.8,double intensi ...

  6. Vue页面上实时显示当前时间,每秒更新

    有时候我们需要在页面上添加一个类似时钟的东西来实时显示当前时间,这个时候我们可以利用定时器来完成这个功能 <div id="app"> {{date}} </di ...

  7. Django的admin样式丢失【静态文件收集】

    在部署完Django项目后,进行admin后台登录发现样式丢失,后台日志显示:js和css文件丢失 解决办法: 配置settings.py如下: #DEBUG打开时,app的静态文件默认从这里读取 S ...

  8. 不同格式的ip 统一转成ip列表

    支持以下格式的ip地址: 192.168.1.0/24 192.168.1.1-23 192.168.1.123 代码如下: package finder; import java.net.InetA ...

  9. kubernetes 1.7.2 安装 记录过程

    系统信息 cat /etc/redhat-release CentOS Linux release (Core) 环境信息 IP地址 主机名称 10.10.6.11 master 10.10.6.12 ...

  10. 剑指offer 面试3题

    面试3题: 题:数组中重复的数字 题目:在一个长度为n的数组里的所有数字都在0到n-1的范围内. 数组中某些数字是重复的,但不知道有几个数字是重复的.也不知道每个数字重复几次.请找出数组中任意一个重复 ...