简单题。

#include<cstdio>
#include<cstring>
#include<cmath>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std; int a1,b1,c1;
int a2,b2,c2;
int ans1,ans2,ans3; int main()
{
scanf("%d.%d.%d",&a1,&b1,&c1);
scanf("%d.%d.%d",&a2,&b2,&c2); int k;
ans3=(c1+c2)%;
k=(c1+c2)/; ans2=(b1+b2+k)%;
k=(b1+b2+k)/; ans1=(a1+a2+k); printf("%d.%d.%d\n",ans1,ans2,ans3);
return ;
}

PAT (Advanced Level) 1058. A+B in Hogwarts (20)的更多相关文章

  1. PAT (Advanced Level) Practice 1027 Colors in Mars (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1027 Colors in Mars (20 分) 凌宸1642 题目描述: People in Mars represent the c ...

  2. PAT (Advanced Level) Practice 1019 General Palindromic Number (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1019 General Palindromic Number (20 分) 凌宸1642 题目描述: A number that will ...

  3. PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642 题目描述: With the 2010 FIFA World Cu ...

  4. PAT (Advanced Level) Practice 1005 Spell It Right (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1005 Spell It Right (20 分) 凌宸1642 题目描述: Given a non-negative integer N ...

  5. PAT (Advanced Level) Practice 1001 A+B Format (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1001 A+B Format (20 分) 凌宸1642 题目描述: Calculate a+b and output the sum i ...

  6. PAT (Advanced Level) 1104. Sum of Number Segments (20)

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

  7. PAT (Advanced Level) 1023. Have Fun with Numbers (20)

    手动模拟一下高精度加法. #include<iostream> #include<cstring> #include<cmath> #include<algo ...

  8. 【PAT Advanced Level】1011. World Cup Betting (20)

    简单模拟题,遍历一遍即可.考察输入输出. #include <iostream> #include <string> #include <stdio.h> #inc ...

  9. PAT (Advanced Level) 1031. Hello World for U (20)

    简单题. #include<iostream> #include<cstring> #include<cmath> #include<algorithm> ...

随机推荐

  1. Infix expressions 中缀表达式

    中缀表达式的计算 利用两个栈来实现,操作数栈,操作符栈 只支持个位数运算 最后必须输入一个'#' #include<iostream> using namespace std; templ ...

  2. LeetCode OJ 236. Lowest Common Ancestor of a Binary Tree

    Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According ...

  3. Django:之安全、国际化和session

    Django 安全 以下是关于Django安全的一些特征,它包括如何使基于Django的网站的一些建议. 关于安全的官方文档:https://docs.djangoproject.com/en/dev ...

  4. 脚本添加crontab任务【转】

    今天朋友问,计划任务是用crontab -e来添加的,如何使用脚本来添加呢? 在执行crontab -e命令时,会在/var/spool/cron目录下创建一个文件,文件的名称是你当前的用户名,内容就 ...

  5. byte数组如何转为short数组 (转)

    最近在搞毕业设计,做的是有关语音识别的手机应用.在处理音频的过程中,发现需要用short数组处理音频,可能光用byte会越界.但是java读文件没有一次性读到short数组中的api,要么是一个一个读 ...

  6. 改良UIScrollView滚动视图

    #define HEIGHT  self.view.frame.size.height #define WIDTH    self.view.frame.size.width @interface V ...

  7. 初次stack-overflow 提交答案

    初次在stack-overflow上面提交答案,首先编辑器非常好用,语法检查都有, 还有付费版的,更高级,更好用,nice. 付费版:https://www.grammarly.com/upgrade ...

  8. ANT 操控 ORACLE数据库实践

    Ant 执行系统命令没有任何问题,这次实际系统命令中可以说遇到了两个问题,一个是启动服务的命令是含有空格的,第二个如何备份数据库可以自动加上日期. 首先,我们启动oracle数据库,操作有两个: 1. ...

  9. Tree Cutting

    Tree Cutting Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others) Prob ...

  10. Spring Boot 系列教程6-全局异常处理

    @ControllerAdvice源码 package org.springframework.web.bind.annotation; import java.lang.annotation.Ann ...