What happens on Problem Day is that what you have to do is basically by the statement.
It's not hard to notice that you are going to find the greatest Devis or of N, which is less than or
equal to K.
This is what the problem asks for.
What is the greatest Devis or of N, which is less than or greater.
Which is less than or equal to K.
Right.
So.
Yeah.
All right.
And you have done a power nine into internal power nine.
So they are quite large.
But the thing is that we all know that mathematical trick in which when you want to compute the to find
the divi zorse or at least to check if some number has the resource or not.
You can iterate until a clear till that number.
Right.
So it's that math trick optimization, which instead of trying out each and every Devis or or possible
divvies or between one and N, you try them between one and a security of N.
And why do you do that?
You do that because let's take a number n.
Right.
If you find all it's D.V. zorse, you can group these deep resource into pairs.
Right.
Let's say for N equals one hundred.
I can group it like this one and one hundred day.
Their product is m true and a 50.
Their product is N four and twenty five.
Their product is N five and 20.
Their product is N 10 and 10.
That product is in its only so far.
Right.
So.
Basically, for each number you can pair is the resource such that the product of those to the resource
equals.
Exactly.
N and if you do this in each of these pairs, you are going to have one number, which is the less than
or equal to ask your state of N, because if you have two D.V. zorse greater than security, their product
is not going to be N.
Right.
So greater than a security cross rate of kurti equals something greater than N..
Right.
So it's pretty obvious that if you group them like this, one of them, the smallest one is for sure.
Less than or equal to is Gerti of N.
Right.
So you can use this kind of property.
And what will you do?
Will you do is look for deep resource?
Oh, that's not it.
Oh, I think that's it.
Oh, yeah.
That's you.
That was a piece of good from other problem, I think.
All right.
Yeah, that's it.
So, yeah, what you're gonna do is that after reading and and keep.
You are trying out each and every possible resource between one and ask your ten of em, if N is not
divisible by D, then you continue.
That's not a valid one.
And if it is, then you have the pair D and and divided by D have this pair of devis or.
Right.
And you see if there is less than a rate is less than or equal to K then you try to.
To update the answer, if the answer is the maximum between answer Dean and the other Devis or from
dispair, which is N divided by D, if it is less or less than or equal to K, then you wanted answer
by and divided by D.
And that's all you have found in answer.
The greatest deviser.
And the answer is and divided by that divisor.