What is wrong with my code?

please help
it passed only one test case
and gave either wa or run error for others