A+B Problem III

A+B Problem III

时间限制:1000 ms  |  内存限制:65535 KB

难度:1

描述
求A+B是否与C相等。

输入
T组测试数据。
每组数据中有三个实数A,B,C(-10000.0<=A,B<=10000.0,-20000.0<=C<=20000.0)
数据保证小数点后不超过4位。

输出
如果相等则输出Yes
不相等则输出No
样例输入
3
-11.1 +11.1 0
11 -11.25 -0.25
1 2 +4
样例输出
Yes
Yes
No

查看代码---运行号:252390----结果:Accepted

运行时间:2012-10-05 19:13:36  |  运行人:huangyibiao

view sourceprint?

01.#include <cstdio>

02.#include <iostream>

03.#include <cmath>

04.usingnamespace
std;

05. 

06.intmain()

07.{

08.intt;

09.scanf("%d ", &t);

10.while(t--)

11.{

12.doublea, b, c;

13.cin >> a >> b >> c;

14.if(fabs(a+b
- c) <=0.0000001)

15.printf("Yes\n");

16.else

17.printf("No\n");

18.}

19.return0;

20.}

时间: 2025-01-20 17:39:35

A+B Problem III的相关文章

HDU1028-Ignatius and the Princess III

Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12789    Accepted Submission(s): 9045 Problem Description "Well, it seems the first problem is too easy. I will let

hdu 1028 Ignatius and the Princess III (母函数)

点击打开链接 Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16394    Accepted Submission(s): 11552 Problem Description "Well, it seems the first problem is too easy. I

hd1028Ignatius and the Princess III【母函数】

Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12832    Accepted Submission(s): 9080 Problem Description "Well, it seems the first problem is too easy. I will let

Varnost slovenskih GSM omrežij III

V torek smo pisali tudi o tem, da Si.Mobil v svojem omrežju dovoli uporabo A5/0 (nešifriranega prenosa podatkov). Tudi njih smo poprosili za komentar. Med čakanjem na odgovor so se razmere rahlo spremenite, a najprej nekaj uvoda. V okviru projekta Os

ZOJ Problem Set - 3713

题意:给定一个字符串,用字符串ASC2码16进制数输出 ,并在前面输出字符串长度的16进制,输出长度的规则是 先输出长度的二进制数的后七位的十六进制(如果左边还有1 则这在后七位前面加上个1再输出  然后二进制数右移动七位,直到左边没有1)   注:所有16数都必须为两位! 解题思路:对长度进行输出处理 解题代码: #include<stdio.h> #include<string.h> #include<stdlib.h> #include<time.h>

A problem when connect MSSQL with transaction.

Problem: Could not load object: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. =============================================== Solve: If you pass "SelectMethod=cursor" attribute in co

Fetching Across Commits: Where Is the Source of the Problem?

Fetching Across Commits: Where Is the Source of the Problem? By Boris Milrud Fetching across commits is a common and accepted practice in the Oracle programming world. However, it is not an ANSI-supported operation. According to the ANSI standard, a

Excel:there was a problem sending the command to the program

症状:同事开Excel的时候,弹出错误提示框提示:There was a problem sending the command to the program,如图: 原因:不详 解决方法:baidu了下,发现是注册表的问题,找到如下key值:HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\ ,将下面的文件夹:Excel改个名字就好了. 查看本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.c

实例编程:迷宫探路III

将从迷宫入口到各点的最短路近的集合看作一棵树.用广度遍历的方法即可找到出口的最短路近.本程序算法思想来源于求图上一点到其余各点最短路近的Dijkstra算法. /* 迷宫探路III(最短路径)*/ /* DIJKSTRAMAZE.C */ /* 2003-8-26 */ #include <stdlib.h> #include <time.h> #include <math.h> #include <stdio.h> #include <graphic