Hey, I am relatively new to comp programming..
I have found the pattern by writing the test cases for n=2,3,4 etc. but I am not able to get AC. I am using a loop until we start getting all numbers consecutively. Can u suggest whats wrong with this approach? For the last two test cases its giving TLE!
@abo I also have an issue in solving sub task 1. I don't understand what's wrong in my code. It gives correct output in my computer though. Someone plz suggest me what to do. Stuck here since two days
:( This is pretty frustrating now.
for all of you, who are getting AC in task#2 and WA in task#1,
if you guys are unable to find your mistake and dont wish to spend any more time in that question, you guys can just make brute solution for task#1 and split your code with if cases with respect to the constraints , thats the most simple thing you guys can do right now.
you can apply the modular addition property if you are using it anywhere in your prog.
(A+B)%m = ((A%m)+(B%m))%m
if you are having problems with mod then this should definitely solve it.
Or u can PM me the code and I will sort the issue out