



'''simple docstring'''




from __future__ import annotations

import csv

import requests
from bsa import BeautifulSoup



def      a      (			lowerCamelCase__ = ""   ):
			'''simple docstring'''





			A_     :						Optional[int]     =					url or """https://www.imdb.com/chart/top/?ref_=nv_mv_250"""
			A_     :						Any     =					BeautifulSoup(requests.get(lowerCamelCase__   ).text						,				"""html.parser"""   )
			A_     :						List[str]     =					soup.find_all("""td"""						,				attrs="""titleColumn"""   )
			A_     :						Dict     =					soup.find_all("""td"""						,				class_="""ratingColumn imdbRating"""   )
			return {
			    title.a.text: float(rating.strong.text   )
			    for title, rating in zip(lowerCamelCase__						,				lowerCamelCase__   )
			}



def      a      (			lowerCamelCase__ = "IMDb_Top_250_Movies.csv"   ):
			'''simple docstring'''





			A_     :						int     =					get_imdb_top_aaa_movies()
			with open(lowerCamelCase__						,				"""w"""						,				newline=""""""   ) as out_file:
						A_     :						Optional[int]     =					csv.writer(lowerCamelCase__   )
						writer.writerow(["""Movie title""", """IMDb rating"""]   )
						for title, rating in movies.items():
									writer.writerow([title, rating]   )


if __name__ == "__main__":
			write_movies()




'''simple docstring'''




from __future__ import annotations

from functools import lru_cache
from math import ceil

lowerCamelCase							:List[str]       = 1_0_0

lowerCamelCase							:Dict       = set(range(3, NUM_PRIMES, 2))
primes.add(2)
lowerCamelCase							:int

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
						if prime not in primes:
												continue
						primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))



@lru_cache(maxsize=1_00   )
def      a      (			lowerCamelCase__   ):
			'''simple docstring'''





			if number_to_partition < 0:
						return set()
			elif number_to_partition == 0:
						return {1}

			A_     :						set[int]     =					set()
			A_     :						int
			A_     :						int

			for prime in primes:
						if prime > number_to_partition:
									continue
						for sub in partition(number_to_partition - prime   ):
									ret.add(sub * prime   )

			return ret



def      a      (			lowerCamelCase__ = 50_00   ):
			'''simple docstring'''





			for number_to_partition in range(1						,				lowerCamelCase__   ):
						if len(partition(lowerCamelCase__   )   ) > number_unique_partitions:
									return number_to_partition
			return None


if __name__ == "__main__":
						print(F"{solution() = }")