Minimum sum of two integers whose product is strictly greater than N | Java program for the above approach ; Function to find the minimum sum of two integers such that their product is strictly greater than N ; Store the answer using the AP - GP inequality ; Print the answer ; Driver Code ; Function Call
import java . lang . * ; class GFG { static void minSum ( int N ) { int ans = ( int ) Math . ceil ( 2 * Math . sqrt ( N + 1 ) ) ; System . out . println ( ans ) ; } public static void main ( String [ ] args ) { int N = 10 ; minSum ( N ) ; } }