




from collections import defaultdict
from math import ceil, sqrt




def        _SCREAMING_SNAKE_CASE      (		snake_case = 1_0_0_0_0_0_0			,     snake_case = 1_0       )						->				int:
						_UpperCAmelCase      =			defaultdict(snake_case       )

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

												hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

												for hole_width in range(snake_case			,     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 <= 1_0       )


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





from typing import Union

import fire
import torch
from tqdm import tqdm




def        _SCREAMING_SNAKE_CASE      (		snake_case			,     snake_case = "cpu"			,     snake_case = None       )						->				None:
						_UpperCAmelCase      =			torch.load(snake_case			,     map_location=snake_case       )
						for k, v in tqdm(state_dict.items()       ):
												if not isinstance(snake_case			,     torch.Tensor       ):
																		raise TypeError("""FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin"""       )
												_UpperCAmelCase      =			v.half()
						if save_path is None:  # overwrite src_path
												_UpperCAmelCase      =			src_path
						torch.save(snake_case			,     snake_case       )


if __name__ == "__main__":
				fire.Fire(convert)