



'''simple docstring'''





import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_torch


if is_torch_available():
		import torch

		from transformers.generation import DisjunctiveConstraint






@require_torch
class __A    (						unittest.TestCase		):



	'''simple docstring'''







	def       a__						(self )					->  Optional[int]:


						"""simple docstring"""



						_a											=						[[1, 2, 4], [1, 2, 3, 4]]
						_a											=						DisjunctiveConstraint(A )
						self.assertTrue(isinstance(dc.token_ids				,     A ) )

						with self.assertRaises(A ):
											DisjunctiveConstraint(torch.LongTensor([[1, 2, 4], [1, 2, 3]] ) )

						with self.assertRaises(A ):
											DisjunctiveConstraint([torch.LongTensor([1, 2, 4] ), torch.LongTensor([1, 2, 3, 4, 5] )] )



	def       a__						(self )					->  Any:


						"""simple docstring"""



						_a											=						[[1, 2], [1, 2, 3, 4]]

						with self.assertRaises(A ):
											DisjunctiveConstraint(A )  # fails here



	def       a__						(self )					->  Dict:


						"""simple docstring"""



						_a											=						[[1, 2, 3], [1, 2, 4]]

						_a											=						DisjunctiveConstraint(A )

						_a						,					_a						,					_a											=						dc.update(1 )
						_a											=						stepped is True and completed is False and reset is False
						self.assertTrue(A )
						self.assertTrue(not dc.completed )
						self.assertTrue(dc.current_seq == [1] )

						_a						,					_a						,					_a											=						dc.update(2 )
						_a											=						stepped is True and completed is False and reset is False
						self.assertTrue(A )
						self.assertTrue(not dc.completed )
						self.assertTrue(dc.current_seq == [1, 2] )

						_a						,					_a						,					_a											=						dc.update(3 )
						_a											=						stepped is True and completed is True and reset is False
						self.assertTrue(A )
						self.assertTrue(dc.completed )  # Completed!
						self.assertTrue(dc.current_seq == [1, 2, 3] )



	def       a__						(self )					->  List[Any]:


						"""simple docstring"""



						_a											=						[[1, 2, 3], [1, 2, 4, 5], [1, 2, 5]]

						_a											=						DisjunctiveConstraint(A )

						_a						,					_a						,					_a											=						dc.update(1 )
						self.assertTrue(not dc.completed )
						self.assertTrue(dc.current_seq == [1] )

						_a						,					_a						,					_a											=						dc.update(2 )
						self.assertTrue(not dc.completed )
						self.assertTrue(dc.current_seq == [1, 2] )

						_a						,					_a						,					_a											=						dc.update(4 )
						self.assertTrue(not dc.completed )
						self.assertTrue(dc.current_seq == [1, 2, 4] )

						_a						,					_a						,					_a											=						dc.update(5 )
						self.assertTrue(dc.completed )  # Completed!
						self.assertTrue(dc.current_seq == [1, 2, 4, 5] )

						dc.reset()

						_a						,					_a						,					_a											=						dc.update(1 )
						self.assertTrue(not dc.completed )
						self.assertTrue(dc.remaining() == 3 )
						self.assertTrue(dc.current_seq == [1] )

						_a						,					_a						,					_a											=						dc.update(2 )
						self.assertTrue(not dc.completed )
						self.assertTrue(dc.remaining() == 2 )
						self.assertTrue(dc.current_seq == [1, 2] )

						_a						,					_a						,					_a											=						dc.update(5 )
						self.assertTrue(dc.completed )  # Completed!
						self.assertTrue(dc.remaining() == 0 )
						self.assertTrue(dc.current_seq == [1, 2, 5] )








'''simple docstring'''





def lowerCAmelCase						(__A = 1_000):



     """simple docstring"""



     _a											=						2**power
     _a											=						str(__A)
     _a											=						list(__A)
     _a											=						0

     for i in list_num:
          sum_of_num += int(__A)

     return sum_of_num


if __name__ == "__main__":
  lowercase_	 =						int(input("Enter the power of 2: ").strip())
  print("2 ^ ", power, " = ", 2**power)
  lowercase_	 =						solution(power)
  print("Sum of the digits is: ", result)



