Minimum squares to cover a rectangle | Python3 program to find the minimum number of squares to cover the surface of the rectangle with given dimensions ; function to count the number of squares that can cover the surface of the rectangle ; Driver code
import math NEW_LINE def squares ( l , b , a ) : NEW_LINE INDENT return math . ceil ( l / a ) * math . ceil ( b / a ) NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT l = 11 NEW_LINE b = 23 NEW_LINE a = 14 NEW_LINE print ( squares ( l , b , a ) ) NEW_LINE DEDENT