

"""simple docstring"""






from typing import Dict, List, Optional, Union

import numpy as np

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import center_crop, normalize, rescale, resize, to_channel_dimension_format
from ...image_utils import (
    IMAGENET_DEFAULT_MEAN,
    IMAGENET_DEFAULT_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    get_image_size,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_vision_available, logging


if is_vision_available():
						import PIL


lowerCamelCase__			:					Optional[Any]							  =					logging.get_logger(__name__)






class       _UpperCAmelCase     (						__a):
			__a	:    int			   =							["""pixel_values"""]
			def __init__(						self ,						_A = True ,						_A = None ,						_A = True ,						_A = None ,						_A = PILImageResampling.BICUBIC ,						_A = True ,						_A = 1 / 2_55 ,						_A = True ,						_A = None ,						_A = None ,						**_A ,						)      ->      None:






				'''simple docstring'''







				super().__init__(**_A       )
				_UpperCAmelCase      :							Optional[Any]       =   crop_size if crop_size is not None else {"""height""": 2_56, """width""": 2_56}
				_UpperCAmelCase      :							Union[str, Any]       =   get_size_dict(_A ,						param_name="""crop_size"""       )
				_UpperCAmelCase      :							str       =   size if size is not None else {"""height""": 2_24, """width""": 2_24}
				_UpperCAmelCase      :							List[str]       =   get_size_dict(_A       )

				_UpperCAmelCase      :							Any       =   do_center_crop
				_UpperCAmelCase      :							Optional[int]       =   crop_size
				_UpperCAmelCase      :							int       =   do_resize
				_UpperCAmelCase      :							Tuple       =   size
				_UpperCAmelCase      :							int       =   resample
				_UpperCAmelCase      :							Optional[Any]       =   do_rescale
				_UpperCAmelCase      :							Union[str, Any]       =   rescale_factor
				_UpperCAmelCase      :							Optional[Any]       =   do_normalize
				_UpperCAmelCase      :							Dict       =   image_mean if image_mean is not None else IMAGENET_DEFAULT_MEAN
				_UpperCAmelCase      :							Optional[int]       =   image_std if image_std is not None else IMAGENET_DEFAULT_STD
			def 							__snake_case	(						self ,						_A ,						_A ,						_A = None ,						_A = None ,						**_A ,						)      ->      np.ndarray:






				'''simple docstring'''







				_UpperCAmelCase      :							Union[str, Any]       =   self.size if size is None else size
				_UpperCAmelCase      :							Optional[int]       =   get_size_dict(_A       )
				_UpperCAmelCase      :							Optional[Any]       =   get_size_dict(_A ,						param_name="""crop_size"""       )

				_UpperCAmelCase  ,				_UpperCAmelCase      :							int       =   get_image_size(_A       )
				_UpperCAmelCase      :							Optional[int]       =   min(_A ,						_A       )
				_UpperCAmelCase      :							List[str]       =   (size["""height"""] / crop_size["""height"""]) * min_dim
				_UpperCAmelCase      :							List[Any]       =   (size["""width"""] / crop_size["""width"""]) * min_dim
				return center_crop(_A ,						size=(cropped_height, cropped_width) ,						data_format=_A ,						**_A       )
			def 							__snake_case	(						self ,						_A ,						_A ,						_A = PIL.Image.BICUBIC ,						_A = None ,						**_A ,						)      ->      np.ndarray:






				'''simple docstring'''







				_UpperCAmelCase      :							Union[str, Any]       =   get_size_dict(_A       )
				if "height" not in size or "width" not in size:
					raise ValueError(f'''The size dictionary must contain the keys \'height\' and \'width\'. Got {size.keys()}'''       )
				return resize(
				    _A ,						size=(size["""height"""], size["""width"""]) ,						resample=_A ,						data_format=_A ,						**_A       )
			def 							__snake_case	(						self ,						_A ,						_A ,						_A = None ,						**_A ,						)      ->      Union[str, Any]:






				'''simple docstring'''







				return rescale(_A ,						scale=_A ,						data_format=_A ,						**_A       )
			def 							__snake_case	(						self ,						_A ,						_A ,						_A ,						_A = None ,						**_A ,						)      ->      np.ndarray:






				'''simple docstring'''







				return normalize(_A ,						mean=_A ,						std=_A ,						data_format=_A ,						**_A       )
			def 							__snake_case	(						self ,						_A ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = None ,						_A = ChannelDimension.FIRST ,						**_A ,						)      ->      PIL.Image.Image:






				'''simple docstring'''







				_UpperCAmelCase      :							Dict       =   do_center_crop if do_center_crop is not None else self.do_center_crop
				_UpperCAmelCase      :							List[Any]       =   crop_size if crop_size is not None else self.crop_size
				_UpperCAmelCase      :							Any       =   get_size_dict(_A ,						param_name="""crop_size"""       )
				_UpperCAmelCase      :							Tuple       =   do_resize if do_resize is not None else self.do_resize
				_UpperCAmelCase      :							Union[str, Any]       =   size if size is not None else self.size
				_UpperCAmelCase      :							Any       =   get_size_dict(_A       )
				_UpperCAmelCase      :							Optional[int]       =   resample if resample is not None else self.resample
				_UpperCAmelCase      :							List[str]       =   do_rescale if do_rescale is not None else self.do_rescale
				_UpperCAmelCase      :							List[Any]       =   rescale_factor if rescale_factor is not None else self.rescale_factor
				_UpperCAmelCase      :							Optional[Any]       =   do_normalize if do_normalize is not None else self.do_normalize
				_UpperCAmelCase      :							str       =   image_mean if image_mean is not None else self.image_mean
				_UpperCAmelCase      :							Optional[int]       =   image_std if image_std is not None else self.image_std

				_UpperCAmelCase      :							Tuple       =   make_list_of_images(_A       )

				if not valid_images(_A       ):
					raise ValueError(
					    """Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, """
					    """torch.Tensor, tf.Tensor or jax.ndarray."""       )

				if do_center_crop and crop_size is None:
					raise ValueError("""If `do_center_crop` is set to `True`, `crop_size` must be provided."""       )

				if do_resize and size is None:
					raise ValueError("""Size must be specified if do_resize is True."""       )

				if do_rescale and rescale_factor is None:
					raise ValueError("""Rescale factor must be specified if do_rescale is True."""       )

				if do_normalize and (image_mean is None or image_std is None):
					raise ValueError("""Image mean and image standard deviation must be specified if do_normalize is True."""       )

				# All transformations expect numpy arrays.
				_UpperCAmelCase      :							Dict       =   [to_numpy_array(_A       ) for image in images]

				if do_center_crop:
					_UpperCAmelCase      :							Dict       =   [self.center_crop(_A ,						_A ,						size=_A       ) for image in images]

				if do_resize:
					_UpperCAmelCase      :							int       =   [self.resize(image=_A ,						size=_A ,						resample=_A       ) for image in images]

				if do_rescale:
					_UpperCAmelCase      :							List[Any]       =   [self.rescale(image=_A ,						scale=_A       ) for image in images]

				if do_normalize:
					_UpperCAmelCase      :							str       =   [self.normalize(image=_A ,						mean=_A ,						std=_A       ) for image in images]

				_UpperCAmelCase      :							Any       =   [to_channel_dimension_format(_A ,						_A       ) for image in images]

				_UpperCAmelCase      :							Any       =   {"""pixel_values""": images}
				return BatchFeature(data=_A ,						tensor_type=_A       )








"""simple docstring"""






from math import factorial
def  UpperCamelCase   (     _lowerCAmelCase       :  Dict,					_lowerCAmelCase       :  List[str]	)			->     Dict:
	return factorial(_lowerCAmelCase	) / (factorial(_lowerCAmelCase	) * factorial(n - r	))
def  UpperCamelCase   (     )			->     Tuple:
	_UpperCAmelCase      :							Optional[int]       =   0

	for i in range(1,					101	):
		for j in range(1,					i + 1	):
			if combinations(_lowerCAmelCase,					_lowerCAmelCase	) > 1E6:
				total += 1
	return total


if __name__ == "__main__":
						print(solution())





