The Code doesn't get accepted


#1

When I’m submitting the code it doesn’t pass for the test case “D”. But if I custom input the Test case : “D” the result is correct. What is the problem?


#2

The logic might be wrong .