Ada and the Staircase

can somebody explain the question and the approach to solve this question,i cannot understand the editorial

//