"""simple docstring"""




def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	str      ,_lowerCamelCase						:	int     )	->				list:
  _lowerCAmelCase						:	Optional[int]        =					word.split()

  def justify(_lowerCamelCase						:	list      ,_lowerCamelCase						:	int      ,_lowerCamelCase						:	int     ) -> str:
    _lowerCAmelCase						:	List[str]        =					max_width - width
    _lowerCAmelCase						:	List[Any]        =					len(_lowerCamelCase     )
    if len(_lowerCamelCase     ) == 1:
      # if there is only word in line
      # just insert overall_spaces_count for the remainder of line
      return line[0] + " " * overall_spaces_count
    else:
      _lowerCAmelCase						:	Tuple        =					words_count - 1
      # num_spaces_between_words_list[i] : tells you to insert
      # num_spaces_between_words_list[i] spaces
      # after word on line[i]
      _lowerCAmelCase						:	str        =					spaces_to_insert_between_words * [
          overall_spaces_count // spaces_to_insert_between_words
      ]
      _lowerCAmelCase						:	int        =					(
          overall_spaces_count % spaces_to_insert_between_words
      )
      # distribute spaces via round robin to the left words
      for i in range(_lowerCamelCase     ):
        num_spaces_between_words_list[i] += 1
      _lowerCAmelCase						:	Any        =					[]
      for i in range(_lowerCamelCase     ):
        # add the word
        aligned_words_list.append(line[i]     )
        # add the spaces to insert
        aligned_words_list.append(num_spaces_between_words_list[i] * """ """     )
      # just add the last word to the sentence
      aligned_words_list.append(line[-1]     )
      # join the aligned words list to form a justified line
      return "".join(_lowerCamelCase     )

  _lowerCAmelCase						:	Tuple        =					[]
  _lowerCAmelCase						:	list[str]        =					[]
  _lowerCAmelCase						:	Union[str, Any]        =					0
  for word in words:
    if width + len(_lowerCamelCase     ) + len(_lowerCamelCase     ) <= max_width:
      # keep adding words until we can fill out max_width
      # width = sum of length of all words (without overall_spaces_count)
      # len(word) = length of current word
      # len(line) = number of overall_spaces_count to insert between words
      line.append(_lowerCamelCase     )
      width += len(_lowerCamelCase     )
    else:
      # justify the line and add it to result
      answer.append(justify(_lowerCamelCase      ,_lowerCamelCase      ,_lowerCamelCase     )     )
      # reset new line and new width
      _lowerCAmelCase      ,     _lowerCAmelCase						:	Tuple        =					[word], len(_lowerCamelCase     )
  _lowerCAmelCase						:	Optional[int]        =					max_width - width - len(_lowerCamelCase     )
  answer.append(""" """.join(_lowerCamelCase     ) + (remaining_spaces + 1) * """ """     )
  return answer


if __name__ == "__main__":
     from doctest import testmod

     testmod()





"""simple docstring"""




def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	int = 100     )	->				int:
  _lowerCAmelCase						:	Optional[Any]        =					n * (n + 1) * (2 * n + 1) / 6
  _lowerCAmelCase						:	Tuple        =					(n * (n + 1) / 2) ** 2
  return int(square_of_sum - sum_of_squares     )


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




