solved codechef 2014 JUL GERALD09