A+B Problem
Time Limit: 1000MS   Memory Limit: 10000K
Total Submissions: 311263   Accepted: 171333

Description

Calculate a+b

Input

Two integer a,b (0<=a,b<=10)

Output

Output a+b
 

Sample Input

1 2

Sample Output

3

计算两个整数的和

解决思路

这是经典水题了,每个OJ必有的。
题目很简单,就是对输入的两个整数a和b,输出它们的和。

用C++的基本语法就能搞定。

C++:
 /*
poj 1000
version:1.0
author:Knight
Email:S.Knight.Work@gmail.com
  website:www.getyourwant.com
*/ #include<cstdio>
using namespace std; int main()
{
int a,b;
scanf("%d%d", &a, &b);
printf("%d\n", a + b);
return ;
}
JAVA:
 import java.io.*;
import java.util.*; public class Main {
public static void main(String[] args) {
Scanner cinScanner = new Scanner(System.in);
int a = cinScanner.nextInt();
int b = cinScanner.nextInt(); System.out.println(a + b);
}
}

 

[POJ 1000] A+B Problem 经典水题 C++解题报告 JAVA解题报告的更多相关文章

  1. fzuoj Problem 2182 水题

    http://acm.fzu.edu.cn/problem.php?pid=2182 Problem 2182 水题 Accept: 188    Submit: 277Time Limit: 100 ...

  2. 【UVA - 1644 / POJ - 3518】Prime Gap(水题)

    Prime Gap 这里直接写中文了 Descriptions: 对于一个数n,若n为素数则输出0,否则找到距离n最小的两个素数,一个大于n,一个小于n,输出他们的差(正数) Input 多组输入 每 ...

  3. caioj 1000到1030都是[水题]

    caioj 1000到1030都是[水题],特此声明一下,可以不做就不要浪费时间做了

  4. 烟大 Contest1024 - 《挑战编程》第一章:入门 Problem A: The 3n + 1 problem(水题)

    Problem A: The 3n + 1 problem Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 14  Solved: 6[Submit][St ...

  5. Poj1298_The Hardest Problem Ever(水题)

    一.Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar eve ...

  6. POJ 2014:Flow Layout 模拟水题

    Flow Layout Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 3091   Accepted: 2148 Descr ...

  7. [POJ 1001] Exponentiation C++解题报告 JAVA解题报告

        Exponentiation Time Limit: 500MS   Memory Limit: 10000K Total Submissions: 126980   Accepted: 30 ...

  8. HDU 4716 A Computer Graphics Problem (水题)

    A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (J ...

  9. POJ 1061 青蛙的约会 数论水题

    http://poj.org/problem?id=1061 傻逼题不多说 (x+km) - (y+kn) = dL 求k 令b = n-m ; a = x - y ; 化成模线性方程一般式 : Lx ...

随机推荐

  1. Redis数据库2

    一.存储list 1.概述     list类型是按照插入顺序排序的字符串链表,可以在头部(left)和尾部(right)添加新的元素,如果不存在,则自动创建;如果list中所有元素被移除,则list ...

  2. Ubuntu 配置IP地址方法

    接到一客户的服务器,开机已启动发现是Ubuntu系统,当时有点郁闷了,心想没有配置过ubuntu系统,这客户还在旁边了,心里有点紧张了,于是开始上网寻找各种方法配置,最终将IP配置好,给客户上架调试通 ...

  3. 编写SQL语句操作数据库(慕课SQLite笔记)

    安卓常用数据存储方式之一SQLite学习及操作笔记 0.视频地址:http://www.imooc.com/video/3382 1.每个程序都有自己的数据库 默认情况下是各自互不干扰 1)创建一个数 ...

  4. centos7使用yum安装不了ffmpeg

    [root@localhost]# yum install ffmpeg Loaded plugins: fastestmirror Loading mirror speeds from cached ...

  5. 简单案列完美搞定Mvc设计模式

    一个小列子搞定Mvc模式,包括数据库以及如何提高用户体验度 1.首先来web.xml配置servlet的访问路径: <?xml version="1.0" encoding= ...

  6. Bot Framework:Activity类简明指南

    Bot Framework相关文档:https://docs.botframework.com/en-us/csharp/builder/sdkreference/attachments.html B ...

  7. [神经网络]一步一步使用Mobile-Net完成视觉识别(一)

    1.环境配置 2.数据集获取 3.训练集获取 4.训练 5.调用测试训练结果 6.代码讲解 本文是第一篇,环境配置篇. 先打开tensorflow object detection api 看看需要什 ...

  8. Java的日期类和日期格式化类

    日期类: Date date = new Date(); // 获取当前的系统时间 2 System.out.println("年份:"+ date.getYear()); Cal ...

  9. 使用lua做序列化和反序列化

    -- lua对象序列化 function serialize(obj) local lua = "" local t = type(obj) if t == "numbe ...

  10. SVN:The working copy is locked due to a previous error (二)

    之前也碰到过这种问题,但是根本问题不同,解决方案不同. 传送门:SVN:The working copy is locked due to a previous error (二) 本次错误如图: 解 ...