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






			@slow
			def 					__lowerCAmelCase					(   self			)     ->	int:
						lowerCAmelCase_       :Any     	=    CamembertModel.from_pretrained("""camembert-base"""			)
						model.to(__A			)

						lowerCAmelCase_       :List[str]     	=    torch.tensor(
						    [[5, 121, 11, 660, 16, 730, 2_5543, 110, 83, 6]]			,  device=__A			,  dtype=torch.long			,  )  # J'aime le camembert !
						with torch.no_grad():
									lowerCAmelCase_       :List[str]     	=    model(__A			)["""last_hidden_state"""]
						lowerCAmelCase_       :Tuple     	=    torch.Size((1, 10, 768)			)
						self.assertEqual(output.shape			,  __A			)
						# compare the actual values for a slice.
						lowerCAmelCase_       :Union[str, Any]     	=    torch.tensor(
						    [[[-0.0_2_5_4, 0.0_2_3_5, 0.1_0_2_7], [0.0_6_0_6, -0.1_8_1_1, -0.0_4_1_8], [-0.1_5_6_1, -0.1_1_2_7, 0.2_6_8_7]]]			,  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			)			)








"""simple docstring"""






import math






def 		_snake_case			(      lowercase__						:    int						)    ->							int:


			'''simple docstring'''





			return sum(int(lowercase__						) for digit in str(lowercase__						)						)






def 		_snake_case			(      lowercase__						:    int = 3_0						)    ->							int:


			'''simple docstring'''





			lowerCAmelCase_       :Union[str, Any]     	=    []
			for digit in range(2 ,	1_0_0						):
						for power in range(2 ,	1_0_0						):
									lowerCAmelCase_       :Tuple     	=    int(math.pow(lowercase__ ,	lowercase__						)						)
									if digit == digit_sum(lowercase__						):
												digit_to_powers.append(lowercase__						)

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


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






