Hacker Earth Challenge question. Raj & his Slippers C#.NET