A - Closed interval
Editorial
/
/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
整数 L,R が与えられます。
L 以上 R 以下の整数がいくつあるか求めてください。
制約
- 1\le L\le R\le 100
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
L R
出力
答えを出力せよ。
入力例 1
3 5
出力例 1
3
3 以上 5 以下の整数は 3,4,5 の 3 つです。したがって、3 を出力してください。
入力例 2
1 7
出力例 2
7
入力例 3
14 79
出力例 3
66
Score : 100 points
Problem Statement
You are given integers L and R.
Find how many integers are between L and R, inclusive.
Constraints
- 1\le L\le R\le 100
- All input values are integers.
Input
The input is given from Standard Input in the following format:
L R
Output
Output the answer.
Sample Input 1
3 5
Sample Output 1
3
The integers between 3 and 5, inclusive, are 3,4,5, which is three integers. Thus, output 3.
Sample Input 2
1 7
Sample Output 2
7
Sample Input 3
14 79
Sample Output 3
66