#K51847. Count Problems in Difficulty Range
Count Problems in Difficulty Range
Count Problems in Difficulty Range
You are given a set of programming problems, each with an associated difficulty level. Your task is to count how many problems have a difficulty within the specified inclusive range \([L, R]\).
The input provides:
- An integer \(T\) which represents the total number of problems.
- A list of \(T\) integers, where each integer represents the difficulty level of a problem.
- Two integers \(L\) and \(R\) that denote the lower and upper bounds of the difficulty range, respectively.
Your program should output a single integer: the count of problems whose difficulty level lies in the range \([L, R]\).
inputFormat
The input is read from stdin and is formatted as follows:
- The first line contains an integer \(T\), the number of problems.
- The second line contains \(T\) space-separated integers representing the difficulty levels of the problems.
- The third line contains two space-separated integers \(L\) and \(R\), the lower and upper bounds of the difficulty range.
outputFormat
The output should be written to stdout and consist of a single integer indicating the count of problems whose difficulty levels are within the inclusive range \([L, R]\).
## sample5
1 5 10 20 30
10 20
2