

"""simple docstring"""



import unittest

import numpy as np
import torch

from .utils_summarization import build_mask, compute_token_type_ids, process_story, truncate_or_pad



class 					a						(       unittest.TestCase				):



    """simple docstring"""



    def 				UpperCamelCase	(     self: Dict       ):






         """simple docstring"""


         A__										=  10

    def 				UpperCamelCase	(     self: int       ):






         """simple docstring"""


         A__										=  [1, 2, 3, 4]
         A__										=  [1, 2, 3, 4, 0, 0, 0, 0, 0, 0]
         self.assertEqual(truncate_or_pad(UpperCamelCase    ,						self.block_size    ,						0       )    ,						UpperCamelCase       )

    def 				UpperCamelCase	(     self: Optional[Any]       ):






         """simple docstring"""


         A__										=  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
         A__										=  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
         self.assertEqual(truncate_or_pad(UpperCamelCase    ,						self.block_size    ,						0       )    ,						UpperCamelCase       )

    def 				UpperCamelCase	(     self: Tuple       ):






         """simple docstring"""


         A__										=  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
         A__										=  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
         self.assertEqual(truncate_or_pad(UpperCamelCase    ,						self.block_size    ,						0       )    ,						UpperCamelCase       )

    def 				UpperCamelCase	(     self: Union[str, Any]       ):






         """simple docstring"""


         A__										=  """It was the year of Our Lord one thousand seven hundred and
        seventy-five.\n\nSpiritual revelations were conceded to England at that
        favoured period, as at this."""
         A__			,				A__										=  process_story(UpperCamelCase       )
         self.assertEqual(UpperCamelCase    ,						[]       )

    def 				UpperCamelCase	(     self: List[str]       ):






         """simple docstring"""


         A__										=  """"""
         A__			,				A__										=  process_story(UpperCamelCase       )
         self.assertEqual(UpperCamelCase    ,						[]       )
         self.assertEqual(UpperCamelCase    ,						[]       )

    def 				UpperCamelCase	(     self: Any       ):






         """simple docstring"""


         A__										=  (
             """It was the year of Our Lord one thousand seven hundred and """
             """seventy-five\n\nSpiritual revelations were conceded to England """
             """at that favoured period, as at this.\n@highlight\n\nIt was the best of times"""
         )
         A__			,				A__										=  process_story(UpperCamelCase       )

         A__										=  [
             """It was the year of Our Lord one thousand seven hundred and seventy-five.""",
             """Spiritual revelations were conceded to England at that favoured period, as at this.""",
         ]
         self.assertEqual(UpperCamelCase    ,						UpperCamelCase       )

         A__										=  ["""It was the best of times."""]
         self.assertEqual(UpperCamelCase    ,						UpperCamelCase       )

    def 				UpperCamelCase	(     self: int       ):






         """simple docstring"""


         A__										=  torch.tensor([1, 2, 3, 4]       )
         A__										=  torch.tensor([1, 1, 1, 1]       )
         np.testing.assert_array_equal(build_mask(UpperCamelCase    ,						0       ).numpy()    ,						expected.numpy()       )

    def 				UpperCamelCase	(     self: List[Any]       ):






         """simple docstring"""


         A__										=  torch.tensor([1, 2, 3, 4, 23, 23, 23]       )
         A__										=  torch.tensor([1, 1, 1, 1, 0, 0, 0]       )
         np.testing.assert_array_equal(build_mask(UpperCamelCase    ,						23       ).numpy()    ,						expected.numpy()       )

    def 				UpperCamelCase	(     self: Any       ):






         """simple docstring"""


         A__										=  torch.tensor([8, 2, 3, 4, 1, 1, 1]       )
         A__										=  torch.tensor([1, 1, 1, 1, 0, 0, 0]       )
         np.testing.assert_array_equal(build_mask(UpperCamelCase    ,						1       ).numpy()    ,						expected.numpy()       )





    def 				UpperCamelCase	(     self: List[str]       ):






         """simple docstring"""


         A__										=  1_01
         A__										=  torch.tensor([[1, 2, 3, 4, 5, 6], [1, 2, 3, 1_01, 5, 6], [1, 1_01, 3, 4, 1_01, 6]]       )
         A__										=  torch.tensor([[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 1]]       )

         A__										=  compute_token_type_ids(UpperCamelCase    ,						UpperCamelCase       )
         np.testing.assert_array_equal(UpperCamelCase    ,						UpperCamelCase       )









"""simple docstring"""



def  _snake_case     (    UpperCAmelCase_  :					int			):
     A__										=  1
     for i in range(1					,   num + 1			):
          fact *= i
     return fact





def  _snake_case     (    UpperCAmelCase_  :					int			):
     A__										=  0
     while number > 0:
          A__										=  number % 10
          sum_of_digits += last_digit
          A__										=  number // 10  # Removing the last_digit from the given number
     return sum_of_digits





def  _snake_case     (    UpperCAmelCase_  :					int = 100			):
     A__										=  factorial(UpperCAmelCase_			)
     A__										=  split_and_add(UpperCAmelCase_			)
     return result


if __name__ == "__main__":
 print(solution(int(input('Enter the Number: ').strip())))






