Minimum sum of two integers whose product is strictly greater than N | Python3 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 result ; Driver Code ; Function Call
import math NEW_LINE def minSum ( N ) : NEW_LINE INDENT ans = math . ceil ( 2 * math . sqrt ( N + 1 ) ) NEW_LINE print ( math . trunc ( ans ) ) NEW_LINE DEDENT N = 10 NEW_LINE minSum ( N ) NEW_LINE