






"""simple docstring"""


def 					UpperCAmelCase			(				a__   ):





						'''simple docstring'''






						return n * (2 * n - 1)


def 					UpperCAmelCase			(				a__   ):





						'''simple docstring'''






						lowerCAmelCase      :Dict				  = (1 + 24 * n) ** 0.5
						return ((1 + root) / 6) % 1 == 0


def 					UpperCAmelCase			(				a__ = 1_44   ):





						'''simple docstring'''






						lowerCAmelCase      :Dict				  = start
						lowerCAmelCase      :Dict				  = hexagonal_num(a__   )
						while not is_pentagonal(a__   ):
												n += 1
												lowerCAmelCase      :List[str]				  = hexagonal_num(a__   )
						return num


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







"""simple docstring"""


import unittest

import torch

from diffusers import DDIMScheduler, TextToVideoZeroPipeline
from diffusers.utils import load_pt, require_torch_gpu, slow

from ..test_pipelines_common import assert_mean_pixel_difference




@slow
@require_torch_gpu
class 	__UpperCamelCase    (    unittest.TestCase	):
					def 					UpperCAmelCase__   (       self       :  Union[str, Any]      )  ->					Optional[Any]:
											lowerCAmelCase      :Union[str, Any]				  = 'runwayml/stable-diffusion-v1-5'
											lowerCAmelCase      :Tuple				  = TextToVideoZeroPipeline.from_pretrained(UpperCAmelCase    ,   torch_dtype=torch.floataa      ).to('cuda'      )
											lowerCAmelCase      :Union[str, Any]				  = DDIMScheduler.from_config(pipe.scheduler.config      )
											lowerCAmelCase      :str				  = torch.Generator(device='cuda'      ).manual_seed(0      )

											lowerCAmelCase      :Any				  = 'A bear is playing a guitar on Times Square'
											lowerCAmelCase      :Optional[Any]				  = pipe(prompt=UpperCAmelCase    ,   generator=UpperCAmelCase      ).images

											lowerCAmelCase      :List[str]				  = load_pt(
											    'https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/text-to-video/A bear is playing a guitar on Times Square.pt'      )

											assert_mean_pixel_difference(UpperCAmelCase    ,   UpperCAmelCase      )