Question-https://codeforces.com/gym/102263/problem/H

My Solution-https://codeforces.com/gym/102263/submission/56275129

Problem-Getting Wrong Answer on test case 50.

My thinking-

I tried to find out logic for this problem by analyzing various cases of n and k and took out one observation from that for every n-k steaks it takes 5 minutes.

Can anyone help with this question?