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

时间:2022-09-05 07:35:23

简单题。

#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 &lpar;Advanced Level&rpar; Practice 1027 Colors in Mars &lpar;20 分&rpar; 凌宸1642

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

  2. PAT &lpar;Advanced Level&rpar; Practice 1019 General Palindromic Number &lpar;20 分&rpar; 凌宸1642

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

  3. PAT &lpar;Advanced Level&rpar; Practice 1011 World Cup Betting &lpar;20 分&rpar; 凌宸1642

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

  4. PAT &lpar;Advanced Level&rpar; Practice 1005 Spell It Right &lpar;20 分&rpar; 凌宸1642

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

  5. PAT &lpar;Advanced Level&rpar; Practice 1001 A&plus;B Format &lpar;20 分&rpar; 凌宸1642

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

  6. PAT &lpar;Advanced Level&rpar; 1104&period; Sum of Number Segments &lpar;20&rpar;

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

  7. PAT &lpar;Advanced Level&rpar; 1023&period; Have Fun with Numbers &lpar;20&rpar;

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

  8. 【PAT Advanced Level】1011&period; World Cup Betting &lpar;20&rpar;

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

  9. PAT &lpar;Advanced Level&rpar; 1031&period; Hello World for U &lpar;20&rpar;

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

随机推荐

  1. JDK、JRE、JVM

    首先来说一下JDKJDK(Java Development Kit) 是 Java 语言的软件开发工具包(SDK).JDK是整个JAVA的核心,包括了Java运行环境(Java Runtime Env ...

  2. Spring与其他Web框架集成

    Spring与多种流行Web应用框架(Struts.JSF和DWR)集成的方法. Spring强大的IoC容器和企业支持特性使其十分适于实现Java EE应用的服务和持续层. 对于表现层,可以在许多不 ...

  3. T-SQL备忘&lpar;2&rpar;:聚合函数运算和NULL

    我们看表的数据: 而select AVG(Age) from Member1的结果为27.自己算一下就知道136/6 =22.666.而不是27,因此知道实际上Age为NULL的行没有参与运算.即: ...

  4. (转)MapReduce中的两表join几种方案简介

    转自:http://blog.csdn.net/leoleocmm/article/details/8602081 1. 概述 在传统数据库(如:MYSQL)中,JOIN操作是非常常见且非常耗时的.而 ...

  5. poj2287

    田忌赛马的题目- - 贪心策略: 1,如果田忌的最快马快于齐王的最快马,则两者比. (因为若是田忌的别的马很可能就赢不了了,所以两者比) 2,如果田忌的最快马慢于齐王的最快马,则用田忌的最慢马和齐王的 ...

  6. Windows 8 动手实验系列教程 实验6:设置和首选项

    动手实验 实验6:设置和首选项 2012年9月 简介 实验3介绍了合约并演示了应用程序如何轻松地与共享和搜索合约实现集成.合约同样包含设置超级按钮,它对活动的Windows应用商店应用的设置进行修改. ...

  7. 关于安装linux时要怎么分区的考虑的參考方式&quest;

    对于使用最小化安装的centos7文件夹列表,注意链接方式的文件夹会在统计占用空间时不会算入的; watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcWlkaX ...

  8. svn基本操作和图标介绍

    注意事项:    .svn这个隐藏目录记录着两项关键信息:工作文件的基准版本和一个本地副本最后更新的时间戳,千万不要手动修改或者删除这个.svn隐藏目录和里面的文件!!,否则将会导致你本地的工作拷贝( ...

  9. CMake 条件判断

    CMake简介 CMake 是做什么的? CMake是一套类似于automake的跨平台辅助项目编译的工具. 我觉得语法更加简单易用. CMake的工作流程 CMake处理*目录的CMakeList ...

  10. Tomcat环境变量配置命令行报错:The JRE&lowbar;HOME environment variable is not defined correctl This environment variable is needed to run this program

    1. tomcat——>bin——>setclasspath.bat,使用记事本打开. 2. 添加如下代码即可: 为自己实际的环境变量配置为准!!! set JAVA_HOME=D:\ID ...