




'''simple docstring'''







def 						_A      ( UpperCAmelCase = 10      ,UpperCAmelCase = 1000      ,UpperCAmelCase = True						):






   '''simple docstring'''







   assert (
       isinstance(UpperCAmelCase      ,UpperCAmelCase						)
       and isinstance(UpperCAmelCase      ,UpperCAmelCase						)
       and isinstance(UpperCAmelCase      ,UpperCAmelCase						)
   ), "Invalid type of value(s) specified to function!"

   if min_val > max_val:
      raise ValueError('Invalid value for min_val or max_val (min_value < max_value)'						)
   return min_val if option else max_val







def 						_A      ( UpperCAmelCase      ,UpperCAmelCase						):






   '''simple docstring'''







   return int((number_a + number_a) / 2						)







def 						_A      ( UpperCAmelCase      ,UpperCAmelCase      ,UpperCAmelCase						):






   '''simple docstring'''







   assert (
       isinstance(UpperCAmelCase      ,UpperCAmelCase						) and isinstance(UpperCAmelCase      ,UpperCAmelCase						) and isinstance(UpperCAmelCase      ,UpperCAmelCase						)
   ), 'argument values must be type of "int"'

   if lower > higher:
      raise ValueError('argument value for lower and higher must be(lower > higher)'						)

   if not lower < to_guess < higher:
      raise ValueError(
          'guess value must be within the range of lower and higher value'						)

   def answer(UpperCAmelCase						) -> str:
      if number > to_guess:
         return "high"
      elif number < to_guess:
         return "low"
      else:
         return "same"

   print('started...'						)

   A__       =     lower
   A__       =     higher

   A__       =     []

   while True:
      A__       =     get_avg(UpperCAmelCase      ,UpperCAmelCase						)
      last_numbers.append(UpperCAmelCase						)

      if answer(UpperCAmelCase						) == "low":
         A__       =     number
      elif answer(UpperCAmelCase						) == "high":
         A__       =     number
      else:
         break

   print(F"""guess the number : {last_numbers[-1]}"""						)
   print(F"""details : {last_numbers!s}"""						)







def 						_A      ( ):






   '''simple docstring'''







   A__       =     int(input('Enter lower value : '						).strip()						)
   A__       =     int(input('Enter high value : '						).strip()						)
   A__       =     int(input('Enter value to guess : '						).strip()						)
   guess_the_number(UpperCAmelCase      ,UpperCAmelCase      ,UpperCAmelCase						)


if __name__ == "__main__":
    main()








'''simple docstring'''







def 						_A      ( UpperCAmelCase						):






   '''simple docstring'''







   A__       =     0
   while num > 0:
      digit_sum += num % 10
      num //= 10
   return digit_sum







def 						_A      ( UpperCAmelCase = 100						):






   '''simple docstring'''







   A__       =     1
   A__       =     2

   for i in range(2      ,max_n + 1						):
      A__       =     pre_numerator
      A__       =     2 * i // 3 if i % 3 == 0 else 1
      A__       =     cur_numerator
      A__       =     e_cont * pre_numerator + temp

   return sum_digits(UpperCAmelCase						)


if __name__ == "__main__":
    print(f'''{solution() = }''')


