简单题。

#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. Chapter 1 First Sight——32

    The class seemed to drag on longer than the others. 这堂课看起来比别的课要长. Was it because the day was finally ...

  2. isset() 与 empty() 的区别

    PHP的isset()函数 一般用来检测变量是否设置 格式:bool isset ( mixed var [, mixed var [, ...]] ) 功能:检测变量是否设置 返回值: 若变量不存在 ...

  3. Java-多重if 结构

    import java.util.*;public class ifs { public static void main(String args[]){ Scanner in=new Scanner ...

  4. 第13章 Swing程序设计----JDialog窗体

    JDialog窗体是Swing组件中的对话框 JDialog窗体的功能是从一个窗体中弹出另一个窗体,就像是在使用IE浏览器时弹出的确定对话框一样. 在应用程序中创建JDialog窗体需要实例化JDia ...

  5. Qt使用中碰到的问题

    1.发现table第一列在切换后变黑,或多了行数. 一般是编译出来的.exe文件所使用的qt的dll不匹配造成的.一定要使用编译时,所使用的那个版本的qt的dll.

  6. linux 内核协议栈收报流程(一)ixgbe网卡驱动

    首先模块加载insmod ixgbe.ko module_init(ixgbe_init_module); module_init(ixgbe_init_module); { int ret; pr_ ...

  7. sqlserver日志文件过大的处理方法

      SqlServer 数据库中与备份和恢复相关的日志文件有MDF和LDF文件 存在于\\sqlserver_install_dir\MSSQL\Data\1.文件解释.mdf文件    MDF是SQ ...

  8. 最简单易懂的webService客户端之soap+xml请求

    代码准备: 1.网络上有提供一些免费的服务器测试地址,可以上这里找一找:https://my.oschina.net/CraneHe/blog/183471 2.我选择了一个翻译地址:http://w ...

  9. eclipse 终极操作技巧

    eclipse作为一个java开发必备软件,从用户体验来说,还是蛮一般的(按照初始设置的话),所以有必要进行一些设置上的改良,加上对一些好用的快捷键的挖掘,能让你用eclipse更加得心应手,事半功倍 ...

  10. cell reuse & disposebag

    For my project I've made base cell class TableViewCell: UITableViewCell { private(set) var disposeBa ...