hi,my code is giving time limit error!,and i am not able to fix it,please check my code.
My code givIng TLE! error
@Nikhil-Jettley-2567269533523013 firstly, you did not take input for n.
Secondly, the condition in your nested for loop is wrong it should be
![]()
After these changes code will not give TLE, the logic is still wrong however since it is not giving the correct output.
yes mam ,i understood my mistake,i corrected them,but it give wrong answer !
@Nikhil-Jettley-2567269533523013 output format is not matching with the given sample output, you have to print spaces between each number as well.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.