
import math




def        __UpperCamelCase					(    lowerCAmelCase__							:    int  ):
 __a			:  str		    =  0
 __a			:  Union[str, Any]		    =  0
 while num > 0:
  __a			:  Dict		    =  num % 8
  __a			:  Optional[Any]		    =  octal + (remainder * math.floor(math.pow(1_0  ,       lowerCAmelCase__  )  ))
  counter += 1
  __a			:  Any		    =  math.floor(num / 8  )  # basically /= 8 without remainder if any
  # This formatting removes trailing '.0' from `octal`.
 return f"0o{int(lowerCAmelCase__  )}"




def        __UpperCamelCase					(    ):
 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(6_5  )  )  # = 101
 print('''\n216 in octal is:'''  )
 print(decimal_to_octal(2_1_6  )  )  # = 330
 print('''\n512 in octal is:'''  )
 print(decimal_to_octal(5_1_2  )  )  # = 1000
 print('''\n'''  )


if __name__ == "__main__":
      main()


def        __UpperCamelCase					(    lowerCAmelCase__							:    str  ,       lowerCAmelCase__							:    str  ):
 __a			:  Any		    =  len(lowerCAmelCase__  )
 __a			:  Union[str, Any]		    =  []
 for i in range(len(lowerCAmelCase__  ) - pat_len + 1  ):
  __a			:  List[Any]		    =  True
  for j in range(lowerCAmelCase__  ):
   if s[i + j] != pattern[j]:
    __a			:  Union[str, Any]		    =  False
    break
  if match_found:
   position.append(lowerCAmelCase__  )
 return position


if __name__ == "__main__":
      assert naive_pattern_search('ABCDEFG', 'DE') == [3]
      print(naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC'))
