A + B Problem,hdu-1000

A + B Problem

Problem Description

Calculate A + B.

Input

Each line will contain two integers A and B. Process to end of file.

Output

For each case, output A + B in one line.

Sample Input

1 1

Sample Output

2

#include<stdio.h>
#include<stdlib.h>
int main()
{
      int a,b;
      while(scanf("%d%d",&a,&b)!=EOF)//直到遇到EOF才停止输入
      printf("%d\n",a+b);//输出a+b
return 0;
}

时间: 2024-10-12 16:07:25

A + B Problem,hdu-1000的相关文章

String Problem hdu 3374 最小表示法加KMP的next数组

String Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1492    Accepted Submission(s): 662 Problem Description Give you a string with length N, you can generate N strings by left shifts.

Interesting Housing Problem HDU - 2426 (KM)

Interesting Housing Problem HDU - 2426 题意:n个人,m个房间,安排住宿.要求每个人不能分到不喜欢的房间,且使满意度最大. 不用slack几乎要超时~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int inf=0x3f3f3f3f; 4 const int maxn=550; 5 6 int c[maxn][maxn]; 7 int vb[maxn],vg[maxn],eb[maxn

D - Ugly Problem HDU - 5920

D - Ugly Problem HDU - 5920 Everyone hates ugly problems. You are given a positive integer. You must represent that number by sum of palindromic numbers. A palindromic number is a positive integer such that if you write out that integer as a string i

HDU 1000 A + B Problem(指针版)

A + B Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 654986    Accepted Submission(s): 204210 Problem Description Calculate A + B. Input Each line will contain two integers A and B. Pr

HDU 1000 A + B Problem

Problem Description Calculate A + B. Input Each line will contain two integers A and B. Process to end of file. Output For each case, output A + B in one line. Sample Input 1 1 Sample Output 2 题意:输入A,B输出A+B #include <stdio.h> int main() { int a,b; w

HDU 1000 A+B Problem C/C++

Problem Description Calculate A + B. Input Each line will contain two integers A and B. Process to end of file. Output For each case, output A + B in one line. Sample Input 1 1 Sample Output 2 Author HDOJ C++: 1 int main() { 2 3 int a, b; 4 5 while (

水题/hdu 1000 A + B problem

题意 输入a,b,输出a+b: 分析 注意多case Accepted Code 1 /* 2 PROBLEM:hdu1000 3 AUTHER:NicoleLam 4 MEMO:水题 5 */ 6 7 #include<cstdio> 8 int main() 9 { 10 int a,b; 11 while (scanf("%d%d",&a,&b)!=EOF) printf("%d\n",a+b); 12 return 0; 13 }

(线段树 区间查询)The Water Problem -- hdu -- 5443 (2015 ACM/ICPC Asia Regional Changchun Online)

链接: http://acm.hdu.edu.cn/showproblem.php?pid=5443 The Water Problem Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 738    Accepted Submission(s): 591 Problem Description In Land waterless, w

hdu 1000

A + B Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 486513    Accepted Submission(s): 154130 Problem Description Calculate A + B Input Each line will contain two integers A and B. Proc

The King’s Problem (hdu 3861 强连通缩点+最小路径覆盖)

The King's Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2085    Accepted Submission(s): 741 Problem Description In the Kingdom of Silence, the king has a new problem. There are N cit