Failed the 10th test case

Rest every test case is correct except the 10th one which is showing me wrong-answer

Remove line no 9, i.e n=n%c from your code…

Still its showing wrong answer for the 10th test case

Use long long int instead of only int, since constraints are large