GDUFE ACM-1000 A+B

题目:http://acm.gdufe.edu.cn/Problem/read/id/1000

A + B Problem

Time Limit: 2000/1000ms (Java/Others)

Problem Description:

 Caculate A + B. Process to end of file.

Input:

The input consists of multiple line, each line contain two integers A and B, which means you need EOF format.                                  

Output:

For each case,output A + B in one line.
Needn‘t to save all the cases‘ answer in an array, just output the A + B after each cases.

Sample Input:

1 2
4 5

Sample Output:

3
9

思路:很简单的一道题......就是把A和B加起来复杂度分析:就是很简单...

附上我的代码:

#include<stdio.h>
int main()
{
int A,B;
while(scanf("%d%d",&A,&B)!=EOF)
{
printf("%d\n",A+B);
}
return 0;
}

时间: 2024-10-08 01:52:27

GDUFE ACM-1000 A+B的相关文章

ACM 1000

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 C语言代码 #include int main() { int a,b; while(~scanf("%d%d&q

【ACM】【Pro.1000】A + B Problem ACM之旅开始啦

A + B Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 446348    Accepted Submission(s): 141167 Link:http://acm.hdu.edu.cn/showproblem.php?pid=1000 #include <stdio.h> main() { int a,b; w

http://acm.gdufe.edu.cn/Problem/read/id/1007

递推题目系列之一涂色问题 Time Limit: 2000/1000ms (Java/Others) Problem Description 有排成一行的n个方格,用红(Red).粉(Pink).绿(Green)三色涂每个格子,每格涂一色,要求任何相邻的方格不能同色,且首尾两格也不同色.求全部的满足要求的涂法. Input: 输入数据包含多个测试实例,每个测试实例占一行,由一个整数N组成,(0<n<=50). Output: 对于每个测试实例,请输出全部的满足要求的涂法,每个实例的输出占一行.

ACM 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 Author HDOJ 解题思路:非常简单的一道水题,输入两个整数,输出整数的和. 代

[ACM]HDU Problem 1000 + Java

//no package name //import when necessary import java.util.Scanner; //it has to be Main class public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); //Wrong answer when using while(true) while(input.hasNex

GDUFE ACM-1050

题目:http://acm.gdufe.edu.cn/Problem/read/id/1050 a/b + c/d Time Limit: 2000/1000ms (Java/Others) Problem Description: 给你2个分数,求他们的和,并要求和为最简形式. Input: 输入首先包含一个正整数T(T<=1000),表示有T组测试数据,然后是T行数据,每行包含四个正整数a,b,c,d(0<a,b,c,d<1000),表示两个分数a/b 和 c/d. Output:

GDUFE ACM-1019 Repeating Characters

题目:http://acm.gdufe.edu.cn/Problem/read/id/1019 Problem Description: For this problem, you will write a program that takes a string of characters, S, and creates a new string of characters, T, with each character repaeated R times. That is, R copies

HDU 3296 &amp; POJ 3138 Acm Team Section(数学)

题目链接: HDU: http://acm.hdu.edu.cn/showproblem.php?pid=3296 POJ:  http://poj.org/problem?id=3138 Acm Team Section Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 159    Accepted Submission(s): 47

HDU 5014 Number Sequence(2014 ACM/ICPC Asia Regional Xi&#39;an Online) 题解

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5014 Number Sequence Problem Description There is a special number sequence which has n+1 integers. For each number in sequence, we have two rules: ● ai ∈ [0,n] ● ai ≠ aj( i ≠ j ) For sequence a and sequ