




def 					UpperCAmelCase__     (   lowerCamelCase,	lowerCamelCase      ):
  lowercase			:Dict							=  len(lowerCamelCase      )
  print("The following activities are selected:"      )

  # The first activity is always selected
  lowercase			:List[Any]							=  0
  print(lowerCamelCase,	end=","      )

  # Consider rest of the activities
  for j in range(lowerCamelCase      ):
    # If this activity has start time greater than
    # or equal to the finish time of previously
    # selected activity, then select it
    if start[j] >= finish[i]:
      print(lowerCamelCase,	end=","      )
      lowercase			:int							=  j


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     _UpperCAmelCase		:  List[Any]	=   [1, 3, 0, 5, 8, 5]
     _UpperCAmelCase		:  Dict	=   [2, 4, 6, 7, 9, 9]
     print_max_activities(start, finish)









import math
import sys



def 					UpperCAmelCase__     (   lowerCamelCase      ):
  if number != int(lowerCamelCase      ):
    raise ValueError("the value of input must be a natural number"      )
  if number < 0:
    raise ValueError("the value of input must not be a negative number"      )
  if number == 0:
    return 1
  lowercase			:Dict							=  [-1] * (number + 1)
  lowercase			:Optional[Any]							=  0
  for i in range(1,	number + 1      ):
    lowercase			:Optional[int]							=  sys.maxsize
    lowercase			:Any							=  int(math.sqrt(lowerCamelCase      )      )
    for j in range(1,	root + 1      ):
      lowercase			:Any							=  1 + answers[i - (j**2)]
      lowercase			:Dict							=  min(lowerCamelCase,	lowerCamelCase      )
    lowercase			:Union[str, Any]							=  answer
  return answers[number]


if __name__ == "__main__":
     import doctest

     doctest.testmod()



