PAT (Advanced Level) 1058. A+B in Hogwarts (20)
简单题。
#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)的更多相关文章
- 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 ...
- PAT (Advanced Level) Practice 1019 General Palindromic Number (20 分) 凌宸1642
PAT (Advanced Level) Practice 1019 General Palindromic Number (20 分) 凌宸1642 题目描述: A number that will ...
- 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 ...
- 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 ...
- 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 ...
- PAT (Advanced Level) 1104. Sum of Number Segments (20)
简单题. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #in ...
- PAT (Advanced Level) 1023. Have Fun with Numbers (20)
手动模拟一下高精度加法. #include<iostream> #include<cstring> #include<cmath> #include<algo ...
- 【PAT Advanced Level】1011. World Cup Betting (20)
简单模拟题,遍历一遍即可.考察输入输出. #include <iostream> #include <string> #include <stdio.h> #inc ...
- PAT (Advanced Level) 1031. Hello World for U (20)
简单题. #include<iostream> #include<cstring> #include<cmath> #include<algorithm> ...
随机推荐
- Chapter 1 First Sight——27
Throughout all this conversation, my eyes flickered again and again to the table where the strange f ...
- divide an integer into X parts (as even as possible)
the algorithm is like this: it evenly spreads an integer N over K cells. for i = 0 to K array[i] = N ...
- Apache的最小配置
以下配置是Apache的最小配置,路径为/usr/local/apache2/conf/include/lww.xhprof.conf <VirtualHost *:> ServerNam ...
- PHP中GD库安装
安装gd库扩展不能像其他扩展安装一样,直接./configure --prefix=/xxx 还需要激活png,jpeg,字库等支持 ./configure --prefix=/xxx --with- ...
- Codeforces Round #372 (Div. 2) C 数学
http://codeforces.com/contest/716/problem/C 题目大意:感觉这道题还是好懂得吧. 思路:不断的通过列式子的出来了.首先我们定义level=i, uplevel ...
- mvc动态生成a标签,多个属性,多个querystring
1*服务端 客户端 跳转的url 2*服务端 客户端 跳转的url 3*服务端 客户端 跳转的url 4*服务端 客户端 跳转的url
- gre tunnel
http://searchenterprisewan.techtarget.com/tip/GRE-tunnel-vs-IPsec-tunnel-What-is-the-difference Enca ...
- MySQL 异常错误码使用 及 对照表
DECLARE CONTINUE HANDLER FOR SQLWARNING, SQLEXCEPTION, NOT FOUND BEGIN GET DIAGNOSTICS CONDITION cod ...
- Object调用控件的办法
<OBJECT id="pwdpad" style="LEFT: 0px; WIDTH: 35px; TOP: 0px; HEIGHT: 16px" cl ...
- vs2010在进行数据架构比较时报'text lines should not be null'错误
通过VS2010进行服务器数据库和本地数据库比较架构(都是sql server 2008 R2)时,弹出“text lines should be not null”错误,如下图: 解决方法:在Vis ...