






"""simple docstring"""


def 			snake_case  (A_      :List[Any]	,			A_      :List[str]	,			A_      :List[str]      ):







  '''simple docstring'''

  assert b != 0, "This cannot accept modulo that is == 0"
  if n == 0:
    return 1

  if n % 2 == 1:
    return (bin_exp_mod(A_	,			n - 1	,			A_      ) * a) % b

  a     :			int				=   bin_exp_mod(A_	,			n / 2	,			A_      )
  return (r * r) % b


if __name__ == "__main__":
   try:
      _UpperCamelCase				:    List[Any]     =						int(input('Enter Base : ').strip())
      _UpperCamelCase				:    Optional[Any]     =						int(input('Enter Power : ').strip())
      _UpperCamelCase				:    Optional[int]     =						int(input('Enter Modulo : ').strip())
   except ValueError:
      print('Invalid literal for integer')

   print(bin_exp_mod(BASE, POWER, MODULO))












"""simple docstring"""


import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device


if is_torch_available():
   import torch

   from transformers import CamembertModel






@require_torch
@require_sentencepiece
@require_tokenizers
class 						snake_case  (  unittest.TestCase       ):





    @slow
    def 				lowerCamelCase__      (							self	:					str			):


      '''simple docstring'''




      a     :			int				=   CamembertModel.from_pretrained('camembert-base'			)
      model.to(A			)

      a     :			List[Any]				=   torch.tensor(
          [[5, 1_2_1, 1_1, 6_6_0, 1_6, 7_3_0, 2_5_5_4_3, 1_1_0, 8_3, 6]]				,		device=A				,		dtype=torch.long				,		)  # J'aime le camembert !
      with torch.no_grad():
        a     :			int				=   model(A			)['last_hidden_state']
      a     :			Union[str, Any]				=   torch.Size((1, 1_0, 7_6_8)			)
      self.assertEqual(output.shape				,		A			)
      # compare the actual values for a slice.
      a     :			List[str]				=   torch.tensor(
          [[[-0.02_54, 0.02_35, 0.10_27], [0.06_06, -0.18_11, -0.04_18], [-0.15_61, -0.11_27, 0.26_87]]]				,		device=A				,		dtype=torch.float				,		)
      # camembert = torch.hub.load('pytorch/fairseq', 'camembert.v0')
      # camembert.eval()
      # expected_slice = roberta.model.forward(input_ids)[0][:, :3, :3].detach()

      self.assertTrue(torch.allclose(output[:, :3, :3]				,		A				,		atol=1E-4			)			)




