Search Results

Search found 1 results on 1 pages for 'remuladgryta'.

Page 1/1 | 1 

  • smallest perimiter rectangle with given integer area and integer sides

    - by remuladgryta
    Given an integer area A, how can one find integer sides w and h of a rectangle such that w*h = A and w+h is as small as possible? I'd rather the algorithm be simple than efficient (although within reasonable efficiency). What would be the best way to accomplish this? Finding out the prime factors of A, then combining them in some way that tries to balance w and h? Finding the two squares with integer sides with areas closest to A and then somehow interpolating between them? Any other method i'm not thinking of?

    Read the article

1