





"""simple docstring"""




def 						UpperCAmelCase__		(     _UpperCAmelCase					):






  """simple docstring"""





  A_  :       list[list[float]]										=  []
  for data in source_data:
    for i, el in enumerate(_UpperCAmelCase					):
      if len(_UpperCAmelCase					) < i + 1:
        data_lists.append([]					)
      data_lists[i].append(float(_UpperCAmelCase					)					)
  return data_lists





def 						UpperCAmelCase__		(     _UpperCAmelCase ,					_UpperCAmelCase					):






  """simple docstring"""





  A_  :       list[list[float]]										=  []
  for dlist, weight in zip(_UpperCAmelCase ,					_UpperCAmelCase					):
    A_  :       Any										=  min(_UpperCAmelCase					)
    A_  :       Any										=  max(_UpperCAmelCase					)

    A_  :       list[float]										=  []
    # for weight 0 score is 1 - actual score
    if weight == 0:
      for item in dlist:
        try:
          score.append(1 - ((item - mind) / (maxd - mind))					)
        except ZeroDivisionError:
          score.append(1					)

    elif weight == 1:
      for item in dlist:
        try:
          score.append((item - mind) / (maxd - mind)					)
        except ZeroDivisionError:
          score.append(0					)

        # weight not 0 or 1
    else:
      A_  :       Tuple										=  f"""Invalid weight of {weight:f} provided"""
      raise ValueError(_UpperCAmelCase					)

    score_lists.append(_UpperCAmelCase					)

  return score_lists





def 						UpperCAmelCase__		(     _UpperCAmelCase					):






  """simple docstring"""





  A_  :       list[float]										=  [0 for i in range(len(score_lists[0]					)					)]

  for slist in score_lists:
    for j, ele in enumerate(_UpperCAmelCase					):
      A_  :       Dict										=  final_scores[j] + ele

  return final_scores





def 						UpperCAmelCase__		(     _UpperCAmelCase ,					_UpperCAmelCase					):






  """simple docstring"""





  A_  :       Union[str, Any]										=  get_data(_UpperCAmelCase					)
  A_  :       List[str]										=  calculate_each_score(_UpperCAmelCase ,					_UpperCAmelCase					)
  A_  :       List[Any]										=  generate_final_scores(_UpperCAmelCase					)

  # append scores to source data
  for i, ele in enumerate(_UpperCAmelCase					):
    source_data[i].append(_UpperCAmelCase					)

  return source_data






"""simple docstring"""




import os





def 						UpperCAmelCase__		(     ):






  """simple docstring"""





  A_  :       Any										=  os.path.join(os.path.dirname(_UpperCAmelCase					) ,					'num.txt'					)
  with open(_UpperCAmelCase					) as file_hand:
    return str(sum(int(_UpperCAmelCase					) for line in file_hand					)					)[:10]


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