
"""simple docstring"""




def 			_lowerCAmelCase		(		_UpperCamelCase    ):






  """simple docstring"""



  if not isinstance(_UpperCamelCase			,					_UpperCamelCase    ):
    raise ValueError('''check_bouncy() accepts only integer arguments'''    )
  _lowercase:      int   			=  str(_UpperCamelCase    )
  _lowercase:      Tuple   			=  ''''''.join(sorted(_UpperCamelCase    )    )
  return sorted_str_n != str_n and sorted_str_n[::-1] != str_n




def 			_lowerCAmelCase		(		_UpperCamelCase = 99    ):






  """simple docstring"""



  if not 0 < percent < 100:
    raise ValueError('''solution() only accepts values from 0 to 100'''    )
  _lowercase:      Union[str, Any]   			=  0
  _lowercase:      List[Any]   			=  1

  while True:
    if check_bouncy(_UpperCamelCase    ):
      bouncy_num += 1
    if (bouncy_num / num) * 100 >= percent:
      return num
    num += 1


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

  testmod()
  print(f"""{solution(9_9)}""")


"""simple docstring"""




from __future__ import annotations

import typing
from collections import Counter




def 			_lowerCAmelCase		(		_UpperCamelCase    ):






  """simple docstring"""



  _lowercase:      typing.Counter[int]   			=  Counter()
  for base in range(1			,					max_perimeter + 1    ):
    for perpendicular in range(_UpperCamelCase			,					max_perimeter + 1    ):
      _lowercase:      str   			=  (base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(_UpperCamelCase    ):
        _lowercase:      str   			=  int(base + perpendicular + hypotenuse    )
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets




def 			_lowerCAmelCase		(		_UpperCamelCase = 1_000    ):






  """simple docstring"""



  _lowercase:      int   			=  pythagorean_triple(_UpperCamelCase    )
  return triplets.most_common(1    )[0][0]


if __name__ == "__main__":
  print(f"""Perimeter {solution()} has maximum solutions""")
