Please tell me the problem in my code for problem FATCHEF. Here’s my code : click here.
If possible please tell me the test case for which my code fails.

Thank you.

1 Like

Hi, your code doesn’t run for the sample test cases. Your solution with test case : Solution

You are using %s instead of %c for taking input a character so it doesn’t work correctly and displays 1 only. Also, on changing it to %c, the answer for the last case is 4 but your code gives 1(for the last sample input case).

Link after changing %s to %c --> Solution 2


Thanks for enlightening. I corrected that but still WA! Here’s the code : click here .

Thank you.

Hi, your code gives WA for the test case:


6 3

A 2

B 3

C 6

Expected Answer=3
Your Answer=1

1 Like

Thanks a ton.