in the von neuman loves binary challenge there are a few constraints like N<=1000 but we don’t don’t take any account of that…
What about the constraints?
hi @ankit-c11 the constraints are given to you so that you get an idea about the time complexity required by the question and what type of data type to use (int or long long int). If the constraints are too large then your time complexity must be less but if constraints are small (like this problem) then your complexity might be large too.
I don’t understand complexity at present…
I tried to put constraints while taking the input
// do{
cin>>min;
// }while(min>100 || min < 0);
// do{
cin>>max;
// }while(max<=min || max>500);
// do{
cin>>step;
// }while(step<0);
But it resulted in time out so had to comment out the do and while statements…
didn’t we need to put constraints like this ?
@ankit-c11 you dont need to put the constraints like this. Watch the time complexity videos and you will understand. For now, you can ignore the constraints.