Function to find the closest perfect square taking minimum steps to reach from a number
function getClosestPerfectSquare ( N ) { if ( isPerfect ( N ) ) { document . write ( N + " " + " " + " " ) ; return ; }