A + B Problem(hdu1000)

注意,认真读题目的Input要求,看看是输入一组测试数据还是输入多组测试数据。输入多组数据,不要忘记while()。

#include<iostream>
using namespace std;
int main()
{
    double A;
    double B;
    while(cin>>A>>B)
    {
        cout<<A+B<<endl;
    }
}
时间: 2024-10-05 22:04:59

A + B Problem(hdu1000)的相关文章

hdu 4974 A simple water problem(数学题)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4974 Problem Description Dragon is watching competitions on TV. Every competition is held between two competitors, and surely Dragon's favorite. After each competition he will give a score of either 0 or

hdu 5349 MZL&#39;s simple problem(multiset)

代码: #include<set> #include<cstdio> using namespace std; multiset<int> st; int main() { int n; multiset<int>::iterator it; while(scanf("%d",&n)==1) { st.clear(); int k,num; for(int i=0; i<n; i++) { scanf("%d&qu

A+B Problem(V)

A+B Problem(V) 描述 做了A+B Problem之后,Yougth感觉太简单了,于是他想让你求出两个数反转后相加的值.帮帮他吧 输入 有多组测试数据.每组包括两个数m和n,数据保证int范围,当m和n同时为0是表示输入结束. 输出 输出反转后相加的结果. 样例输入 1234 1234 125 117 0 0 样例输出 8642 1232 #include <iostream> #include <cmath> using namespace std; int reve

HDU - 4971 A simple brute force problem. (DP)

Problem Description There's a company with several projects to be done. Finish a project will get you profits. However, there are some technical problems for some specific projects. To solve the problem, the manager will train his employee which may

hdu 1016 Prime Ring Problem (dfs)

一切见注释. #include <cstdio> #include <iostream> #include <cstring> #include <algorithm> using namespace std; bool vis[22]; int n; int ans[22]; int top; bool isprime(int x)//判断素数 { for(int i=2;i<x;i++) if(x%i==0)return false; return

uva10026 - Shoemaker&#39;s Problem(贪心)

题目:10026 - Shoemaker's Problem 题目大意:有个鞋匠在同一天接到了一堆的生意.可是他每天只能做一双鞋,给出做每双鞋需要的时间和推辞做鞋的赔偿.问怎样合理的分配才能使得赔偿最小. 解题思路:鞋子编号  要花的时间  需要的赔偿(每天) 1                    1                100 2                    5                  4 这样的两双鞋有两种安排: 做完1再做2      赔偿  1 * 4:

Jam&#39;s math problem(思维)

Jam's math problem Submit Status Practice HDU 5615 Description Jam has a math problem. He just learned factorization.  He is trying to factorize  into the form of .  He could only solve the problem in which p,q,m,k are positive numbers.  Please help

南阳844--A+B Problem(V)

A+B Problem(V) 时间限制:1000 ms  |  内存限制:65535 KB 难度:1 描述 做了A+B Problem之后,Yougth感觉太简单了,于是他想让你求出两个数反转后相加的值.帮帮他吧 输入 有多组测试数据.每组包括两个数m和n,数据保证int范围,当m和n同时为0是表示输入结束. 输出 输出反转后相加的结果. 样例输入 1234 1234 125 117 0 0 样例输出 8642 1232 来源 Yougth原创 1 #include<stdio.h> 2 #i

HDU 5349 MZL&#39;s simple problem(优先队列)

MZL's simple problem Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 776    Accepted Submission(s): 375 Problem Description A simple problem Problem Description You have a multiple set,and now