


"""simple docstring"""







from __future__ import annotations

import math




def    UpperCAmelCase__       (lowerCAmelCase_   ):




					'''simple docstring'''


					if num <= 0:
										__SCREAMING_SNAKE_CASE						   =				f"""{num}: Invalid input, please enter a positive integer."""
										raise ValueError(lowerCAmelCase_   )

					__SCREAMING_SNAKE_CASE						   =				[True] * (num + 1)
					__SCREAMING_SNAKE_CASE						   =				[]
					__SCREAMING_SNAKE_CASE						   =				2
					__SCREAMING_SNAKE_CASE						   =				int(math.sqrt(lowerCAmelCase_   )   )

					while start <= end:
										# If start is a prime
										if sieve[start] is True:
															prime.append(lowerCAmelCase_   )

															# Set multiples of start be False
															for i in range(start * start  ,						num + 1  ,						lowerCAmelCase_   ):
																				if sieve[i] is True:
																									__SCREAMING_SNAKE_CASE						   =				False

										start += 1

					for j in range(end + 1  ,						num + 1   ):
										if sieve[j] is True:
															prime.append(lowerCAmelCase_   )

					return prime


if __name__ == "__main__":
		print(prime_sieve(int(input('''Enter a positive integer: ''').strip())))



"""simple docstring"""





import webbrowser
from sys import argv
from urllib.parse import parse_qs, quote

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
							__UpperCamelCase  :      Tuple							      =		'''%20'''.join(argv[1:]) if len(argv) > 1 else quote(str(input('''Search: ''')))

							print('''Googling.....''')

							__UpperCamelCase  :      Optional[int]							      =		F'''https://www.google.com/search?q={query}&num=100'''

							__UpperCamelCase  :      Optional[Any]							      =		requests.get(
							    url,
							    headers={'''User-Agent''': str(UserAgent().random)},
							)

							try:
														__UpperCamelCase  :      Union[str, Any]							      =		(
														    BeautifulSoup(res.text, '''html.parser''')
														    .find('''div''', attrs={'''class''': '''yuRUbf'''})
														    .find('''a''')
														    .get('''href''')
														)

							except AttributeError:
														__UpperCamelCase  :      str							      =		parse_qs(
														    BeautifulSoup(res.text, '''html.parser''')
														    .find('''div''', attrs={'''class''': '''kCrYT'''})
														    .find('''a''')
														    .get('''href''')
														)['''url'''][0]

							webbrowser.open(link)




