1. #include <stdio.h>
  2. int main()
  3. {
  4. int ans1[];
  5. int ans2[];
  6. while(scanf("%d.%d.%d %d.%d.%d",&ans1[],&ans1[],&ans1[],&ans2[],&ans2[],&ans2[])!=EOF)
  7. {
  8. ans1[]+=ans2[];
  9. ans1[]+=ans2[];
  10. ans1[]+=ans2[];
  11. ans1[]+=ans1[]/;
  12. ans1[]=ans1[]%;
  13. ans1[]+=ans1[]/;
  14. ans1[]=ans1[]%;
  15. printf("%d.%d.%d\n",ans1[],ans1[],ans1[]);
  16. }
  17. }

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

  1. 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 ...

  2. 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 ...

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

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

  4. PAT甲题题解-1058. A+B in Hogwarts (20)-大水题

    无语,这种水题还出,浪费时间,但又不得不A... #include <iostream> #include <cstdio> #include <algorithm> ...

  5. 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 ...

  6. 【PAT甲级】1058 A+B in Hogwarts (20 分)

    题意: 输入两组,每组三个非负整数A,B,C(A<=1e7,B<17,C<29),输出相加的和.(类似个位上29进制,十位上17进制运算) AAAAAccepted code: #d ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. 视频播放-VideoVIew,Vitamio

    播放视频文件其实并不比播放音频文件复杂,主要是使用 VideoView类来实现的.这个类将视频的显示和控制集于一身,使得我们仅仅借助它就可以完成一个简易的视频播放器.VideoView的用法和 Med ...

  2. struts2拦截器源码分析

    前面博客我们介绍了开发struts2应用程序的基本流程(开发一个struts2的实例),通过前面我们知道了struts2实现请求转发和配置文件加载都是拦截器进行的操作,这也就是为什么我们要在web.x ...

  3. Eclipse输入任意字母或指定字符出现提示框

    Eclipse默认是输入"."的时候会有提示框提示对应的API. 如果想更方便的输入任意字母或者指定的符号出现提示框设置如下: 打开Eclipse,选中“Window”->& ...

  4. [改善Java代码]不要让四舍五入亏了一方

    建议25: 不要让四舍五入亏了一方 本建议还是来重温一个小学数学问题:四舍五入.四舍五入是一种近似精确的计算方法,在Java 5之前,我们一般是通过使用Math.round来获得指定精度的整数或小数的 ...

  5. 关于JDK中的集合总结(二)

    1.2版本的JDK才出现的java集合框架. 下面介绍说一下Vector的一些特点. import java.util.Enumeration; import java.util.Iterator; ...

  6. SQL Server批量更新数据

    项目中有一个位置需要批量插入几万条数据,批量insert等待时间简直...用SqlBulkCopy后,之前需要1分钟左右的sql现在只要一眨眼(真的只要一眨眼) 稍后这个功能要加到另外一个项目中,另外 ...

  7. ORACLE之PACKAGE-游标变量

    刚学pl/sql编程,写了两个package.pkg_temp_fn31和pkg_temp_fn32.内容涉及pl/sql基本语法,游标变量,存储过程(in,out). pkg_temp_fn31调用 ...

  8. Redis - 环境的安装配置

    Redis 下载安装步骤: 下载 redis 源码: [huey@huey-K42JE ~]$ wget http://download.redis.io/releases/redis-x.y.z.t ...

  9. SQL<>0查询不到NUll的值

    这几天遇到这样一个问题,sql中写<>0,刚好某个记录是NULL,道理上是满足<>0的啊,可是就是抽不出来,关于这个问题,到处找了点资料,算是这里 写一个总结出来. 用java ...

  10. spring+hibernate管理多个数据源(非分布式事务)

    本文通过一个demo,介绍如何使用spring+hibernate管理多个数据源,注意,本文的事务管理并非之前博文介绍的分布式事务. 这个demo将使用两个事务管理器分别管理两个数据源.对于每一个独立 ...