




'''simple docstring'''





def UpperCAmelCase						(					UpperCAmelCase_	):
    return n * (2 * n - 1)





def UpperCAmelCase						(					UpperCAmelCase_	):
    _a							:       Any       					=			(1 + 24 * n) ** 0.5
    return ((1 + root) / 6) % 1 == 0





def UpperCAmelCase						(					UpperCAmelCase_ = 144	):
    _a							:       int       					=			start
    _a							:       int       					=			hexagonal_num(UpperCAmelCase_	)
    while not is_pentagonal(UpperCAmelCase_	):
        n += 1
        _a							:       Optional[Any]       					=			hexagonal_num(UpperCAmelCase_	)
    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 						a_       ( self   ):







      '''simple docstring'''


      _a							:       List[Any]       					=			"""runwayml/stable-diffusion-v1-5"""
      _a							:       Tuple       					=			TextToVideoZeroPipeline.from_pretrained(__lowerCAmelCase		,    torch_dtype=torch.floataa   ).to("""cuda"""   )
      _a							:       Dict       					=			DDIMScheduler.from_config(pipe.scheduler.config   )
      _a							:       int       					=			torch.Generator(device="""cuda"""   ).manual_seed(0   )

      _a							:       Union[str, Any]       					=			"""A bear is playing a guitar on Times Square"""
      _a							:       List[Any]       					=			pipe(prompt=__lowerCAmelCase		,    generator=__lowerCAmelCase   ).images

      _a							:       Any       					=			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(__lowerCAmelCase		,    __lowerCAmelCase   )


