Failed test cases

Compilation is successful , output is correct then why it is failing test cases .Where is the problem in the code?