




class 						__lowercase		:




      """simple docstring"""





      def __init__(				self    ,				A     )		->    int:
         # we need a list not a string, so do something to change the type
         snake_case				:    Union[str, Any]           =	arr.split(""","""     )

      def      UpperCAmelCase				(				self     )		->    Tuple:
         snake_case				:    Tuple           =	[int(self.array[0]     )] * len(self.array     )
         snake_case				:    Tuple           =	[int(self.array[0]     )] * len(self.array     )
         for i in range(1    ,				len(self.array     )     ):
            snake_case				:    Optional[Any]           =	max(
                int(self.array[i]     ) + sum_value[i - 1]    ,				int(self.array[i]     )     )
            snake_case				:    Optional[int]           =	max(sum_value[i]    ,				rear[i - 1]     )
         return rear[len(self.array     ) - 1]


if __name__ == "__main__":
       lowerCamelCase	:	Any				=   input('please input some numbers:')
       lowerCamelCase	:	int				=   SubArray(whole_array)
       lowerCamelCase	:	str				=   array.solve_sub_array()
       print(('the results is:', re))











from math import pow




def 						SCREAMING_SNAKE_CASE__ (   lowercase						,lowercase						,lowercase						,lowercase						,lowercase						,)  ->       tuple[int, int]:
   if current_sum == needed_sum:
      # If the sum of the powers is equal to needed_sum, then we have a solution.
      solutions_count += 1
      return current_sum, solutions_count

   snake_case				:    Union[str, Any]           =	int(pow(lowercase						,lowercase					)					)
   if current_sum + i_to_n <= needed_sum:
      # If the sum of the powers is less than needed_sum, then continue adding powers.
      current_sum += i_to_n
      snake_case     , snake_case				:    List[Any]           =	backtrack(
          lowercase						,lowercase						,current_number + 1						,lowercase						,lowercase					)
      current_sum -= i_to_n
   if i_to_n < needed_sum:
      # If the power of i is less than needed_sum, then try with the next power.
      snake_case     , snake_case				:    str           =	backtrack(
          lowercase						,lowercase						,current_number + 1						,lowercase						,lowercase					)
   return current_sum, solutions_count




def 						SCREAMING_SNAKE_CASE__ (   lowercase						,lowercase					)  ->       int:
   if not (1 <= needed_sum <= 1000 and 2 <= power <= 10):
      raise ValueError(
          """Invalid input\n"""
          """needed_sum must be between 1 and 1000, power between 2 and 10."""					)

   return backtrack(lowercase						,lowercase						,1						,0						,0					)[1]  # Return the solutions_count


if __name__ == "__main__":
       import doctest

       doctest.testmod()





