Help me in solving ARRHALVES problem

My issue

answer

My code

# cook your dish here

Learning course: Additional practice problems
Problem Link: https://www.codechef.com/learn/course/kl-daa-practice/KLDAAPR01/problems/ARRHALVES