

"""simple docstring"""




import os

# Precomputes a list of the 100 first triangular numbers
lowerCAmelCase							:    List[Any]  							=							[int(0.5 * n * (n + 1)) for n in range(1, 101)]



def 					a__				(       )		->      Dict:
			lowerCamelCase       =      os.path.dirname(os.path.realpath(UpperCamelCase__       )       )
			lowerCamelCase       =      os.path.join(UpperCamelCase__ ,				"""words.txt"""       )

			lowerCamelCase       =      """"""
			with open(UpperCamelCase__       ) as f:
						lowerCamelCase       =      f.readline()

			lowerCamelCase       =      [word.strip("""\""""       ) for word in words.strip("""\r\n"""       ).split(""","""       )]
			lowerCamelCase       =      [
			    word
			    for word in [sum(ord(UpperCamelCase__       ) - 64 for x in word       ) for word in words]
			    if word in TRIANGULAR_NUMBERS
			]
			return len(UpperCamelCase__       )


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









"""simple docstring"""




import tempfile
import unittest

from make_student import create_student_by_copying_alternating_layers

from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch


lowerCAmelCase							:    Optional[Any]  							=							"""sshleifer/bart-tiny-random"""
lowerCAmelCase							:    List[Any]  							=							"""patrickvonplaten/t5-tiny-random"""






@require_torch
class 					__magic_name__							( unittest.TestCase       ):






				'''simple docstring'''





				@cached_property
				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							return AutoConfig.from_pretrained(_a				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=1				)
							self.assertEqual(student.config.num_hidden_layers	,				1				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=_a				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=_a				)
							self.assertEqual(student.config.encoder_layers	,				1				)
							self.assertEqual(student.config.decoder_layers	,				self.teacher_config.encoder_layers				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=1				)
							self.assertEqual(student.config.encoder_layers	,				1				)
							self.assertEqual(student.config.decoder_layers	,				1				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							with self.assertRaises(_a				):
										create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=_a	,				d=_a				)



