P1000 A+B Problem

P1000A+B Problem

背景

for beginners,特设此题,^_^

描述

输入两个自然数,输出他们的和

格式

输入格式

两个自然数x和y 0<=x,y<=327670<=x,y<=32767

输出格式

一个数,即x和y的和

样例1

样例输入1[复制]

123 500

样例输出1[复制]

623

限制

各个测试点1s

入门题,不多说,题解:

//C++

#include<iostream>

using namespace std;

int main()

{

long long a,b;

cin>>a>>b;

a+=b;

cout<<a<<endl;

}

/*

excited!*/

时间: 2024-08-07 20:27:23

P1000 A+B Problem的相关文章

Vijos P1000 A+B Problem

描述输入两个自然数,输出他们的和 格式输入格式 两个自然数x和y (0<=x,y<=32767)输出格式 一个数,即x和y的和 样例输入1 123 500样例输出 623 限制各个测试点1s #include <iostream> using namespace std; int main() { int a,b; cin>>a>>b; cout<<(a+b)<<endl; return 0; } Vijos P1000 A+B Pr

1000: A+B Problem(NetWork Flow)

1000: A+B Problem Time Limit: 1 Sec  Memory Limit: 5 MBSubmit: 11814  Solved: 7318[Submit][Status][Discuss] Description Calculate a+b Input Two integer a,b (0<=a,b<=10) Output Output a+b Sample Input 1 2 Sample Output 3 HINT Q: Where are the input a

1:A+B Problem

总时间限制:  1000ms  内存限制:  65536kB 描述 Calculate a + b 输入 Two integer a,,b (0 ≤ a,b ≤ 10) 输出 Output a + b 样例输入 1 2 样例输出 3 提示 Q: Where are the input and the output? A: Your program shall always read input from stdin (Standard Input) and write output to std

A Math Problem

A Math Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 237    Accepted Submission(s): 117 Problem Description You are given a positive integer n, please count how many positive integers

Water Problem

water problem 发布时间: 2015年10月10日 15:34   时间限制: 1000ms   内存限制: 256M 描述 题意很简单 给你N个数, Q个查询 每次查询给你一个区间[L, R] 你要找出 [L, R] 这个区间里面取模M后的最大值. 输入 第一行一个T,表示测试数据组数.第二行两个整数N, M (1<=N<=10^5, 1<=M<=10^9).第三行给你N个整数 整数范围在1到10^9之间.第四行给你一个整数Q. ( 1<=Q<=10^5)

FOJ Problem 2261 浪里个浪

                                                                                                                                                           Problem 2261 浪里个浪 Accept: 40    Submit: 106Time Limit: 1500 mSec    Memory Limit : 32768 KB Pro

XJTUOJ wmq的A&#215;B Problem FFT

wmq的A×B Problem 发布时间: 2017年4月9日 17:06   最后更新: 2017年4月9日 17:07   时间限制: 3000ms   内存限制: 512M 描述 这是一个非常简单的问题. wmq如今开始学习乘法了!他为了训练自己的乘法计算能力,写出了n个整数,并且对每两个数a,b都求出了它们的乘积a×b.现在他想知道,在求出的n(n−1)2个乘积中,除以给定的质数m余数为k(0≤k<m)的有多少个. 输入 第一行为测试数据的组数. 对于每组测试数据,第一行为2个正整数n,

hidden node and exposed node problem

Exposed node problem In wireless networks, theexposed node problem occurs when a node is prevented from sending packets to other nodes because of a neighboring transmitter. Consider an example of 4 nodes labeled R1, S1, S2, and R2, where the two rece

南阳524 A-B Problem

A-B Problem 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 A+B问题早已经被大家所熟知了,是不是很无聊呢?现在大家来做一下A-B吧. 现在有两个实数A和B,聪明的你,能不能判断出A-B的值是否等于0呢? 输入 有多组测试数据.每组数据包括两行,分别代表A和B. 它们的位数小于100,且每个数字前中可能包含+,- 号. 每个数字前面和后面都可能有多余的0. 每组测试数据后有一空行. 输出 对于每组数据,输出一行. 如果A-B=0,输出YES,否则输出NO