Help me with this one!!! Whatever the logic I'm applying, time limit gets exceeded in the Test Case 4. This is my solution — https://codeforces.com/contest/1328/submission/167650940 I've tried without storing the values and directly printing it but the result was same — Time Limit Exceeded.