

'''simple docstring'''





lowerCamelCase      				=     {}


def        __lowercase    (  UpperCAmelCase__		,					UpperCAmelCase__		,					UpperCAmelCase__      ):

					"""simple docstring"""






					if late == 3 or absent == 2:
										return 0

					# if we have no days left, and have not failed any other rules,
					# we have a prize string
					if days == 0:
										return 1

					# No easy solution, so now we need to do the recursive calculation

					# First, check if the combination is already in the cache, and
					# if yes, return the stored value from there since we already
					# know the number of possible prize strings from this point on
					__lowerCAmelCase					=							(days, absent, late)
					if key in cache:
										return cache[key]

					# now we calculate the three possible ways that can unfold from
					# this point on, depending on our attendance today

					# 1) if we are late (but not absent), the "absent" counter stays as
					# it is, but the "late" counter increases by one
					__lowerCAmelCase					=							_calculate(days - 1		,					UpperCAmelCase__		,					late + 1      )

					# 2) if we are absent, the "absent" counter increases by 1, and the
					# "late" counter resets to 0
					__lowerCAmelCase					=							_calculate(days - 1		,					absent + 1		,					0      )

					# 3) if we are on time, this resets the "late" counter and keeps the
					# absent counter
					__lowerCAmelCase					=							_calculate(days - 1		,					UpperCAmelCase__		,					0      )

					__lowerCAmelCase					=							state_late + state_absent + state_ontime

					__lowerCAmelCase					=							prizestrings
					return prizestrings


def        __lowercase    (  UpperCAmelCase__ = 30      ):

					"""simple docstring"""






					return _calculate(UpperCAmelCase__		,					absent=0		,					late=0      )


if __name__ == "__main__":
		print(solution())









def        __lowercase    (  UpperCAmelCase__ = 10		,					UpperCAmelCase__ = 1_000		,					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        __lowercase    (  UpperCAmelCase__		,					UpperCAmelCase__      ):

					"""simple docstring"""






					return int((number_a + number_a) / 2      )


def        __lowercase    (  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...'      )

					__lowerCAmelCase					=							lower
					__lowerCAmelCase					=							higher

					__lowerCAmelCase					=							[]

					while True:
										__lowerCAmelCase					=							get_avg(UpperCAmelCase__		,					UpperCAmelCase__      )
										last_numbers.append(UpperCAmelCase__      )

										if answer(UpperCAmelCase__      ) == "low":
															__lowerCAmelCase					=							number
										elif answer(UpperCAmelCase__      ) == "high":
															__lowerCAmelCase					=							number
										else:
															break

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


def        __lowercase    (  ):

					"""simple docstring"""






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


if __name__ == "__main__":
		main()






