12
Just a simple code golf function for fun, intentionally left open with few rules to see what creativity comes up.
Input: An integer representing the area of a rectangle.
Output: Two integers representing the side lengths of the rectangle that have the least perimeter for the area. (In any order.)
Test cases:
25 => 5, 5
53 => 53, 1
4294967295 => 65537, 65535
For the sake of completeness here the corresponding OEIS numbers: http://oeis.org/A033676 and http://oeis.org/A033677
– flawr – 2016-08-30T23:25:57.493