




from collections import defaultdict
from math import ceil, sqrt







def SCREAMING_SNAKE_CASE    (	lowercase_ = 1_000_000			,    lowercase_ = 10						)       ->	int:



       """simple docstring"""

       A__							=   defaultdict(lowercase_						)

       for outer_width in range(3			,    (t_limit // 4) + 2						):
              if outer_width * outer_width > t_limit:
                     A__							=   max(
                         ceil(sqrt(outer_width * outer_width - t_limit						)						)			,    1						)
              else:
                     A__							=   1

              hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

              for hole_width in range(lowercase_			,    outer_width - 1			,    2						):
                     count[outer_width * outer_width - hole_width * hole_width] += 1

       return sum(1 for n in count.values() if 1 <= n <= 10						)


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








from __future__ import annotations

import csv

import requests
from bsa import BeautifulSoup







def SCREAMING_SNAKE_CASE    (	lowercase_ = ""						)       ->	dict[str, float]:



       """simple docstring"""

       A__							=   url or '''https://www.imdb.com/chart/top/?ref_=nv_mv_250'''
       A__							=   BeautifulSoup(requests.get(lowercase_						).text			,    '''html.parser'''						)
       A__							=   soup.find_all('''td'''			,    attrs='''titleColumn'''						)
       A__							=   soup.find_all('''td'''			,    class_='''ratingColumn imdbRating'''						)
       return {
           title.a.text: float(rating.strong.text						)
           for title, rating in zip(lowercase_			,    lowercase_						)
       }







def SCREAMING_SNAKE_CASE    (	lowercase_ = "IMDb_Top_250_Movies.csv"						)       ->	None:



       """simple docstring"""

       A__							=   get_imdb_top_aaa_movies()
       with open(lowercase_			,    '''w'''			,    newline=''''''						) as out_file:
              A__							=   csv.writer(lowercase_						)
              writer.writerow(['''Movie title''', '''IMDb rating''']						)
              for title, rating in movies.items():
                     writer.writerow([title, rating]						)


if __name__ == "__main__":
  write_movies()


