1058 A+B in Hogwarts (20)
#include <stdio.h>
int main()
{
int ans1[];
int ans2[];
while(scanf("%d.%d.%d %d.%d.%d",&ans1[],&ans1[],&ans1[],&ans2[],&ans2[],&ans2[])!=EOF)
{
ans1[]+=ans2[];
ans1[]+=ans2[];
ans1[]+=ans2[];
ans1[]+=ans1[]/;
ans1[]=ans1[]%;
ans1[]+=ans1[]/;
ans1[]=ans1[]%;
printf("%d.%d.%d\n",ans1[],ans1[],ans1[]);
}
}
1058 A+B in Hogwarts (20)的更多相关文章
- 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 ...
- 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 ...
- PAT (Advanced Level) 1058. A+B in Hogwarts (20)
简单题. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #in ...
- PAT甲题题解-1058. A+B in Hogwarts (20)-大水题
无语,这种水题还出,浪费时间,但又不得不A... #include <iostream> #include <cstdio> #include <algorithm> ...
- PAT Advanced 1058 A+B in Hogwarts (20 分)
If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- a ...
- 【PAT甲级】1058 A+B in Hogwarts (20 分)
题意: 输入两组,每组三个非负整数A,B,C(A<=1e7,B<17,C<29),输出相加的和.(类似个位上29进制,十位上17进制运算) AAAAAccepted code: #d ...
- 1058 A+B in Hogwarts (20分)(水)
If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- a ...
- 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 has ...
- 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 has i ...
随机推荐
- wxPython tools img2py
最近在学习wxPython时,发现img2py工具只能处理单个图标,就自己写了一个简单的小工具,把文件夹下所有的图标文件转化到py文件里, 话不多说,直接上代码: # -*- coding: utf- ...
- LeetCode 42
Trapping Rain Water Given n non-negative integers representing an elevation map where the width of e ...
- [改善Java代码]集合运算时使用更优雅的方式
在初中代数中,我们经常会求两个集合的并集.交集.差集等,在Java中也存在着此 类运算,那如何实现呢? 一提到此类集合操作,大部分的实现者都会说:对两个集合进行遍历,即可求出结果.是的,遍历可以实现并 ...
- XShell提示Connection closed by foreign host的问题 和 路由器分配IP的规则
情况是这样的: VMware中有三个Linux机器分别是crxy99(192.168.1.99),crxy100(192.168.1.100),crxy101(192.168.1.101),crxy1 ...
- 浅谈 Data URI 与 BASE 64 编码
前言(废话):鼓捣 Stylish 的时候发现了这么个奇怪的代码行: Data:image/gif;BASE64,R0lGODlhEAAQAKEAAEKF9NPi/AAAAAAAACH5BAEAAAI ...
- 一些xcode5.1创建的工程在xcode6.0下不能编译的问题
这是因为Xcode5.1.1自动选上了arm64架构, 建议解决办法是: Build Settings-ValidArchitectures中却掉arm64
- asp.net连接oracle无法进行中文字符查询的问题
用 select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET' 查询服务器字符集为 AL32UTF8 数据库连 ...
- 软件设计师考试计算机系统知识——CPU
第一章: 计算机系统知识 1.1.1计算机系统硬件的基本组成 运算器.控制器.存储器.输入设备.输出设备 1.1.2 中央处理器 ①CPU的功能: a.程序控制:CPU通过执行指令来控制程序执行的顺序 ...
- GD库使用小结---2
接着上一篇.GD库可以折腾很多用法出来,当然得跟画图相关,除了前面的验证码.水印外,还可以进行图片的缩放,裁剪.旋转等操作,这在很多应用中可以见到. 1. 加水印 前面已经知道,我们可以使用image ...
- 百练 2973 Skew数 解题报告
思路: 计算出每一个skew数的不同位数表示的权值,然后用该位与权值相乘.用int数组来装权值,用char数组来装skew数. 代码: #include<stdio.h> #include ...