2393661 | CodeChef

Guys please help I am trying this problem where i count both letters in each half it is passing all given test case but gives error on submitting and i could not figure out why please help…

Here is my code - http://tpcg.io/AJXvww80