Help me in solving APPLL02 problem

My issue

solution of this question

My code

using System;

public class Test
{
	public static void Main()
	{
		// your code goes here
	}
}

Learning course: BCS301: Data structures
Problem Link: https://www.codechef.com/learn/course/abesit-dsa/ABESITDS13A/problems/APPLL02