




"""simple docstring"""




import math



def 					a__				(       snake_case__       )		->      str:
			lowerCamelCase       =      0
			lowerCamelCase       =      0
			while num > 0:
						lowerCamelCase       =      num % 8
						lowerCamelCase       =      octal + (remainder * math.floor(math.pow(10 ,				snake_case__       )       ))
						counter += 1
						lowerCamelCase       =      math.floor(num / 8       )  # basically /= 8 without remainder if any
						# This formatting removes trailing '.0' from `octal`.
			return F'0o{int(snake_case__       )}'



def 					a__				(       )		->      None:
			print("""\n2 in octal is:"""       )
			print(decimal_to_octal(2       )       )  # = 2
			print("""\n8 in octal is:"""       )
			print(decimal_to_octal(8       )       )  # = 10
			print("""\n65 in octal is:"""       )
			print(decimal_to_octal(65       )       )  # = 101
			print("""\n216 in octal is:"""       )
			print(decimal_to_octal(2_16       )       )  # = 330
			print("""\n512 in octal is:"""       )
			print(decimal_to_octal(5_12       )       )  # = 1000
			print("""\n"""       )


if __name__ == "__main__":
			main()









"""simple docstring"""




from collections.abc import Sequence



def 					a__				(       snake_case__ ,				snake_case__ = False       )		->      float:
			if not arr:
						return 0

			lowerCamelCase       =      0 if allow_empty_subarrays else float("""-inf"""       )
			lowerCamelCase       =      0.0
			for num in arr:
						lowerCamelCase       =      max(0 if allow_empty_subarrays else num ,				curr_sum + num       )
						lowerCamelCase       =      max(snake_case__ ,				snake_case__       )

			return max_sum


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

					testmod()

					lowerCAmelCase							:    Optional[int]  							=							[-2, 1, -3, 4, -1, 2, 1, -5, 4]
					print(F"""{max_subarray_sum(nums) = }""")



