
'''simple docstring'''







from itertools import permutations







def 				SCREAMING_SNAKE_CASE__	(   __A	)       ->	bool:
	if num[3] % 2 != 0:
		return False

	if (num[2] + num[3] + num[4]) % 3 != 0:
		return False

	if num[5] % 5 != 0:
		return False

	_snake_case   						=		[7, 11, 13, 17]
	for i, test in enumerate(__A	):
		if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
			return False
	return True







def 				SCREAMING_SNAKE_CASE__	(   __A = 10	)       ->	int:
	return sum(
	    int(''.join(map(__A			,				__A	)	)	)
	    for num in permutations(range(__A	)	)
	    if is_substring_divisible(__A	)	)


if __name__ == "__main__":
					print(F'''{solution() = }''')



'''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():
					from transformers import AutoModelForSeqaSeqLM, AutoTokenizer


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


							@slow
							def  lowerCamelCase				(       self  ):





								"""simple docstring"""






								_snake_case   						=		AutoModelForSeqaSeqLM.from_pretrained('google/mt5-small'    ,   return_dict=lowerCAmelCase_  ).to(lowerCAmelCase_  )
								_snake_case   						=		AutoTokenizer.from_pretrained('google/mt5-small'  )

								_snake_case   						=		tokenizer('Hello there'    ,   return_tensors='pt'  ).input_ids
								_snake_case   						=		tokenizer('Hi I am'    ,   return_tensors='pt'  ).input_ids

								_snake_case   						=		model(input_ids.to(lowerCAmelCase_  )    ,   labels=labels.to(lowerCAmelCase_  )  ).loss
								_snake_case   						=		-(labels.shape[-1] * loss.item())

								_snake_case   						=		-84.9127
								self.assertTrue(abs(mtf_score - EXPECTED_SCORE  ) < 1E-4  )

