


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   lowerCamelCase						(	unittest.TestCase  ):

       @slow
       def 					UpperCAmelCase					(      self       ):






        '''simple docstring'''






        snake_case :			Union[str, Any]							=   CamembertModel.from_pretrained('''camembert-base'''       )
        model.to(a__       )

        snake_case :			Union[str, Any]							=   torch.tensor(
            [[5, 1_21, 11, 6_60, 16, 7_30, 2_55_43, 1_10, 83, 6]]						,    device=a__						,    dtype=torch.long						,    )  # J'aime le camembert !
        with torch.no_grad():
         snake_case :			int							=   model(a__       )['''last_hidden_state''']
        snake_case :			Any							=   torch.Size((1, 10, 7_68)       )
        self.assertEqual(output.shape						,    a__       )
        # compare the actual values for a slice.
        snake_case :			Any							=   torch.tensor(
            [[[-0.0254, 0.0235, 0.1027], [0.0606, -0.1811, -0.0418], [-0.1561, -0.1127, 0.2687]]]						,    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       )       )











import math





def 				A      (	_UpperCAmelCase							:  int       )							->					int:







			'''simple docstring'''
			return sum(int(_UpperCAmelCase       ) for digit in str(_UpperCAmelCase       )       )





def 				A      (	_UpperCAmelCase							:  int = 30       )							->					int:







			'''simple docstring'''
			_UpperCAmelCase									=  []
			for digit in range(2				,  100       ):
						for power in range(2				,  100       ):
									_UpperCAmelCase									=  int(math.pow(_UpperCAmelCase				,  _UpperCAmelCase       )       )
									if digit == digit_sum(_UpperCAmelCase       ):
												digit_to_powers.append(_UpperCAmelCase       )

			digit_to_powers.sort()
			return digit_to_powers[n - 1]


if __name__ == "__main__":
							print(solution())
