


'''simple docstring'''






from __future__ import annotations






def 		_A			(lowerCAmelCase__					:int						)				->					list[int]:




     '''simple docstring'''



     _a      =							2
     _a      =							[]
     while i * i <= n:
          if n % i:
               i += 1
          else:
               n //= i
               factors.append(lowerCAmelCase__						)
     if n > 1:
          factors.append(lowerCAmelCase__						)
     return factors


if __name__ == "__main__":
 import doctest

 doctest.testmod()





'''simple docstring'''






def 		_A			(lowerCAmelCase__					:list						)				->					float:




     '''simple docstring'''



     _a      =							0
     while len(lowerCAmelCase__						) > 1:
          _a      =							0
          # Consider two files with minimum cost to be merged
          for _ in range(2						):
               _a      =							files.index(min(lowerCAmelCase__						)						)
               temp += files[min_index]
               files.pop(lowerCAmelCase__						)
          files.append(lowerCAmelCase__						)
          optimal_merge_cost += temp
     return optimal_merge_cost


if __name__ == "__main__":
 import doctest

 doctest.testmod()

