




import torch

from diffusers import DiffusionPipeline




class 		UpperCamelCase__	(lowerCAmelCase__     ):

    '''simple docstring'''



    def __init__(    self     ,  UpperCamelCase__     ,  UpperCamelCase__     )     ->      Optional[Any]:
           super().__init__()

           self.register_modules(unet=UpperCamelCase__     ,  scheduler=UpperCamelCase__     )







    def __call__(    self     )     ->      List[Any]:
           lowerCamelCase   :      Dict			 =					torch.randn(
               (1, self.unet.config.in_channels, self.unet.config.sample_size, self.unet.config.sample_size)     ,  )
           lowerCamelCase   :      Optional[Any]			 =					1

           lowerCamelCase   :      Optional[Any]			 =					self.unet(UpperCamelCase__     ,  UpperCamelCase__     ).sample
           lowerCamelCase   :      int			 =					self.scheduler.step(UpperCamelCase__     ,  UpperCamelCase__     ,  UpperCamelCase__     ).prev_sample

           lowerCamelCase   :      Optional[Any]			 =					scheduler_output - scheduler_output + torch.ones_like(UpperCamelCase__     )

           return result












from math import sqrt

def      A      (      _SCREAMING_SNAKE_CASE = 100_0000    )	-> int:
       lowerCamelCase   :      int			 =					0
       lowerCamelCase   :      int			 =					0
       lowerCamelCase   :      int

       while num_cuboids <= limit:
              max_cuboid_size += 1
              for sum_shortest_sides in range(2 ,2 * max_cuboid_size + 1    ):
                     if sqrt(sum_shortest_sides**2 + max_cuboid_size**2    ).is_integer():
                            num_cuboids += (
                                min(_SCREAMING_SNAKE_CASE ,sum_shortest_sides // 2    )
                                - max(1 ,sum_shortest_sides - max_cuboid_size    )
                                + 1
                            )

       return max_cuboid_size


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






