1000: A+B Problem 时间限制:1 Sec 内存限制:256 MB 提交:4870 解决:3047 [提交] [状态] [讨论版] [命题人:外部导入] 题目描述 用来适应环境的题目,自然比较简单些。 计算2个整数的和。这两个整数都在1到1000之间。 输入 输入只有一行,包括2个整数a, b。之间用一个空格分开。 输出 输出只有一行(这...
1000 ( A + B Problem ) 1、输入问题。 之前都是用C和C++做OJ的,输入输出很方便,代码很短。 2、杭电OJ上的类名好像要求是Main,总之我第一次没成功,看了大家的讨论一改就AC了。 1importjava.util.Scanner;2publicclassMain {34publicstaticvoidmain(String[] args) {5inta,b;6Scanner in =newScanner(S...
Calculate a+b 1. 输入 Two integer a,b (0<=a,b<=10) 1. 输出 Output a+b 1. 样例输入 1 2 样例输出 3 解题思路: 1.首先定义两个整形(int)变量。 2.然后用scanf给这两个变量赋值。 3.最后打印输出a+b就完成了两个数相加求和。 #include <stdio.h> intmain() {inta,b; scanf("%d %d",...
using namespace std; int main() { int inputA,inputB=0; while(cin>>inputA>>inputB) { cout<<inputA+inputB<<endl; } return 0; }
杭电1000 A + B Problem这是杭电OJ的第1000题,这一题其实很简单,但是注意:本题在题目中Process to end of file,还有下面For each case,所以说本题有多种测试情况,不能简单的测试一个用例就结束了,下面是我的c++提交的一个版本。#include<iostream>
A + B Problem 【HDU - 1000】 A + B Problem解析 题目 Calculate A + B. Time limit Memory limit OS 1000 ms 32768 kB Windows input Each line will contain two integers A and B. Process to end of file. output For each case, output A + B in......
hdu 1792 A New Change Problem 题目描述 Now given two kinds of coins A and B,which satisfy that GCD(A,B)=1.Here you can assume that there are enough coins for both kinds.Please calculate the maximal value that you cannot pay and the to......
HDOJ 1000 A + B Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 513689 Accepted Submission(s): 162876 Problem Description Calculate A + B. Input Each line will co......
杭电oj: 1000 A + B Problem Java实现 A + B Problem import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNextInt()) { int a = sc.nextInt();...
hdu 1792 A New Change Problem 题目描述 Now given two kinds of coins A and B,which satisfy that GCD(A,B)=1.Here you can assume that there are enough coins for both kinds.Please calculate the maximal value that you cannot pay and the to... ...