#K36577. Minimum Puzzles to Solve with One Skip
Minimum Puzzles to Solve with One Skip
Minimum Puzzles to Solve with One Skip
Problem Statement: A student is given a list of puzzles, each having a certain difficulty. The student is allowed to skip exactly one puzzle. Your task is to determine the minimum number of puzzles the student must solve. In other words, if there are (N) puzzles, the answer is (N - 1).
It does not matter what the difficulties actually are. The only requirement is that the student solves all but one puzzle. Make sure to read the problem carefully and process the input format correctly.
inputFormat
Input Format:\ The first line contains a single integer (N) (with (N \ge 2)) indicating the total number of puzzles. The second line contains (N) space-separated integers representing the difficulties of the puzzles.
outputFormat
Output Format:\ Output a single integer representing the minimum number of puzzles the student must solve when allowed to skip exactly one puzzle.## sample
5
1 2 3 4 5
4
</p>