simplify solution cpp codechef numpath