Help me in solving JASORTMCQ3 problem

My issue

Explain me an approach

Learning course: Sorting using Java
Problem Link: CodeChef: Practical coding for everyone

Suppose that you have N=5 students.

The grades are a[5]={1,2,3,4,5}.

Since the passing_mark should be strictly greater,

For any integer of X the answer will be:

a[X-1]-1

Example: X = 3

a[3-1]-1= 3-1 = 2 which satisfies the conditions because the 3th person has grade = 3 which is strictly greater than 2

Hence, the answer is printing a[x-1]-1 on the sorted array.