[POJ 1000] A+B Problem 经典水题 C++解题报告 JAVA解题报告
| Time Limit: 1000MS | Memory Limit: 10000K | |
| Total Submissions: 311263 | Accepted: 171333 |
Description
Input
Output
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解题报告的更多相关文章
- fzuoj Problem 2182 水题
http://acm.fzu.edu.cn/problem.php?pid=2182 Problem 2182 水题 Accept: 188 Submit: 277Time Limit: 100 ...
- 【UVA - 1644 / POJ - 3518】Prime Gap(水题)
Prime Gap 这里直接写中文了 Descriptions: 对于一个数n,若n为素数则输出0,否则找到距离n最小的两个素数,一个大于n,一个小于n,输出他们的差(正数) Input 多组输入 每 ...
- caioj 1000到1030都是[水题]
caioj 1000到1030都是[水题],特此声明一下,可以不做就不要浪费时间做了
- 烟大 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 ...
- Poj1298_The Hardest Problem Ever(水题)
一.Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar eve ...
- POJ 2014:Flow Layout 模拟水题
Flow Layout Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 3091 Accepted: 2148 Descr ...
- [POJ 1001] Exponentiation C++解题报告 JAVA解题报告
Exponentiation Time Limit: 500MS Memory Limit: 10000K Total Submissions: 126980 Accepted: 30 ...
- HDU 4716 A Computer Graphics Problem (水题)
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- POJ 1061 青蛙的约会 数论水题
http://poj.org/problem?id=1061 傻逼题不多说 (x+km) - (y+kn) = dL 求k 令b = n-m ; a = x - y ; 化成模线性方程一般式 : Lx ...
随机推荐
- 【转】HEIF图片存储格式探秘
HEIF图片存储格式探秘 2017年12月11日 18:30:43 阅读数:891 HEIF,High Efficiency Image File Format,即高效率图档格式,是由动态图像专家组( ...
- 1979 第K个数
1979 第K个数 时间限制: 1 s 空间限制: 1000 KB 题目等级 : 黄金 Gold 题目描述 Description 给定一个长度为N(0<n<=10000) ...
- mui自定义事件实例
监听自定义事件(接收页面应用) 添加自定义事件监听操作和标准js事件监听类似,可直接通过window对象添加,如下: window.addEventListener('customEvent',fun ...
- uvm_reg_file——寄存器模型(十四)
有了uvm_reg_field, uvm_reg, uvm_block, 也许我们需要跟大的uvm_file,这就是传说中的寄存器堆. // // CLASS: uvm_reg_file // Reg ...
- 创建XML的用法
注意:在实际开发中,注意createElement().createAttribute().createTextNode().appendchild()等方法的具体使用. // root根节点的属性数 ...
- sizeof(int)
sizeof()操作符检测的是系统为后面()中的类型.变量等分配的内存空间的字节数,这里()中是int,就是求系统为int类型的变量分配几个字节. 在16位int平台下是2:在32位int平台下是4: ...
- Python+selenium之测试报告(2)
# -*- coding: utf-8 -*- import HTMLTestReport import HTMLTestRunner import os import sys import time ...
- ADO.Net——防止SQL注入攻击
规避SQL注入 如果不规避,在黑窗口里面输入内容时利用拼接语句可以对数据进行攻击 如:输入Code值 p001' union select * from Info where '1'='1 //这样可 ...
- userBean的删除
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding= ...
- COGS 2342. [SCOI2007]kshort
★★☆ 输入文件:bzoj_1073.in 输出文件:bzoj_1073.out 简单对比时间限制:2 s 内存限制:512 MB [题目描述] 有n个城市和m条单向道路,城市编号为1 ...