**To solve the problem we need knowledge about how Loop works and some basic arithmetic operations. We need to do the following tasks:**

**Find each day’s spiders who will get fully recovered. And can calculate this using mod(%) operation, i.e (a1 % K)****Sum all of N day’s results we get from doing the task of above (1).**

**Time Complexity: O(TestCase * N)**

100%
Solution Ratio

MursaleenEarliest,

mh_naimFastest, 0.0s

MursaleenLightest, 131 kB

Jitendra_BaruaShortest, 142B

Toph uses cookies. By continuing you agree to our Cookie Policy.