Can there be a faster solution for this !!! ???
For the given question Question
Editorial solution
CodeChef Starters 136 Solution Discussion
CF Edu Round 166 Solution Discussion