Pythagorean's Challenge

There’s something in the output format which isn’t said about i think.Because I just tired and found all possible pairs and everything is getting printed for a<=1000.

Can you please tell that small thing which I am missing ?The logic I used is very simple just iterating over i=0 to 31 as it won’t exceed that and two loops for each test case and sorting the output.

Also what should I do if there’s no answer?Should I leave a blank line or not?

Hey @nikhil_sarda, yes if there’s no output leave a line blank, secondly make sure your first loop ‘i’ goes from 0 to 31 and second loop ‘j’ goes from ‘i’ to 31. If you didn’t do so, than the output will not match as there will be two pairs, (0,1) and (1,0). Also make sure you use right formatting in output statements.

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :blush: