The Lazy Caterer 's Problem | This function receives an integer n and returns the maximum number of pieces that can be made form pancake using n cuts ; Use the formula ; Driver Code
def findPieces ( n ) : NEW_LINE INDENT return ( n * ( n + 1 ) ) // 2 + 1 NEW_LINE DEDENT print ( findPieces ( 1 ) ) NEW_LINE print ( findPieces ( 2 ) ) NEW_LINE print ( findPieces ( 3 ) ) NEW_LINE print ( findPieces ( 50 ) ) NEW_LINE