I keep getting WA on my code.Does anyone has critical input cases that I can test my code with?
for n = 1 to 2000 for m = 1 to n print n m
Now you have more than enough test cases to look at. It might be useful for you to run it for some smaller n first.