Tasks in a problem


I am practicing a problem and getting Tasks #1 as AC and Tasks #2,#3 and #4 as WA. What should I do? Is my solution partially correct?

Yes, your solution is partially correct. When tasks are given, you should look at the constraints for each task. Your code may be working for the first task only.

Is it only the constraints or any corner cases I am missing?

It depends on the problem. In the problem statement, it should be mentioned if there are sub-tasks. But, I think you are missing some cases in your code.