I want to find numbers x and y such that x*y = N and |x-y| is minimum. For example;
7 = 7*1
15 = 5*3
16 = 4*4
Is there a fast way to find this?
I want to find numbers x and y such that x*y = N and |x-y| is minimum. For example;
7 = 7*1
15 = 5*3
16 = 4*4
Is there a fast way to find this?
Find the largest number $\le\sqrt{N}$ that divides N. Let it be $a$. Then the required solution is $x=a$, $y=N/a$.