102090: [AtCoder]ABC209 A - Counting
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Score : $100$ points
Problem Statement
How many integers not less than $A$ and not more than $B$ are there?
Constraints
- $1 \leq A \leq 100$
- $1 \leq B \leq 100$
- $A$ and $B$ are integers.
Input
Input is given from Standard Input in the following format:
$A$ $B$
Output
Print the number of integers not less than $A$ and not more than $B$.
Sample Input 1
2 4
Sample Output 1
3
We have three integers not less than $2$ and not more than $4$: $2$, $3$, $4$, so we should print $3$.
Sample Input 2
10 100
Sample Output 2
91
Sample Input 3
3 2
Sample Output 3
0
We have no integers not less than $3$ and not more than $2$, so we should print $0$.
Input
题意翻译
给定 $A$,$B$,求所有的整数 $x$,满足 $A \leq x \leq B$。你只需要输出这样的 $x$ 的数量。**注意 $A$ 有可能大于 $B$,这时请输出 $0$。** $1 \leq A \leq 100$,$1 \leq B \leq 100$。Output
分数:100分
问题描述
有多少个整数不小于$A$且不大于$B$?
限制条件
- $1 \leq A \leq 100$
- $1 \leq B \leq 100$
- $A$和$B$都是整数。
输入
从标准输入以以下格式获取输入:
$A$ $B$
输出
打印出不小于$A$且不大于$B$的整数的数量。
样例输入1
2 4
样例输出1
3
有三个不小于$2$且不大于$4$的整数:$2$,$3$,$4$,所以我们打印$3$。
样例输入2
10 100
样例输出2
91
样例输入3
3 2
样例输出3
0
没有不小于$3$且不大于$2$的整数,所以我们打印$0$。