



"""simple docstring"""





import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
					print('''Googling.....''')
					__lowerCAmelCase       :					str      					=					'''https://www.google.com/search?q=''' + ''' '''.join(sys.argv[1:])
					__lowerCAmelCase       :					int      					=					requests.get(url, headers={'''UserAgent''': UserAgent().random})
					# res.raise_for_status()
					with open('''project1a.html''', '''wb''') as out_file:  # only for knowing the class
										for data in res.iter_content(1_0000):
															out_file.write(data)
					__lowerCAmelCase       :					Dict      					=					BeautifulSoup(res.text, '''html.parser''')
					__lowerCAmelCase       :					Tuple      					=					list(soup.select('''.eZt8xd'''))[:5]

					print(len(links))
					for link in links:
										if link.text == "Maps":
															webbrowser.open(link.get('''href'''))
										else:
															webbrowser.open(F'''https://google.com{link.get("href")}''')






"""simple docstring"""





def 	__lowerCAmelCase						(		__UpperCamelCase      :			int					, __UpperCamelCase      :			int    ):


						'''simple docstring'''






						snake_case_   : Any						=			1  # To kept the Calculated Value
						# Since C(n, k) = C(n, n-k)
						if k > (n - k):
												snake_case_   : Optional[int]						=			n - k
						# Calculate C(n,k)
						for i in range(__UpperCamelCase    ):
												result *= n - i
												result //= i + 1
						return result
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						return binomial_coefficient(2 * node_count					, __UpperCamelCase    ) // (node_count + 1)
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						if n < 0:
												raise ValueError("""factorial() not defined for negative values"""    )
						snake_case_   : Optional[int]						=			1
						for i in range(1					, n + 1    ):
												result *= i
						return result
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						return catalan_number(__UpperCamelCase    ) * factorial(__UpperCamelCase    )


if __name__ == "__main__":
					__lowerCAmelCase       :					Optional[Any]      					=					int(input('''Enter the number of nodes: ''').strip() or 0)
					if node_count <= 0:
										raise ValueError('''We need some nodes to work with.''')
					print(
					    F'''Given {node_count} nodes, there are {binary_tree_count(node_count)} '''
					    F'''binary trees and {catalan_number(node_count)} binary search trees.'''
					)

