"""simple docstring"""


from __future__ import annotations

import typing
from collections import Counter






def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  _UpperCAmelCase						 =      Counter()
  for base in range(1   ,max_perimeter + 1		):
    for perpendicular in range(_lowerCamelCase   ,max_perimeter + 1		):
      _UpperCAmelCase						 =      (base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(_lowerCamelCase		):
        _UpperCAmelCase						 =      int(base + perpendicular + hypotenuse		)
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets






def     __UpperCAmelCase					(			lowercase = 10_00		):







  """simple docstring"""
  _UpperCAmelCase						 =      pythagorean_triple(_lowerCamelCase		)
  return triplets.most_common(1		)[0][0]


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

"""simple docstring"""


import unittest

from knapsack import knapsack as k


class        a				(		unittest.TestCase   ):


    def      lowerCAmelCase_  (					self	:  List[Any]					):
      _UpperCAmelCase						 =      0
      _UpperCAmelCase						 =      [0]
      _UpperCAmelCase						 =      [0]
      _UpperCAmelCase						 =      len(__lowerCAmelCase					)
      self.assertEqual(k.knapsack(__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase					)   ,				0					)

      _UpperCAmelCase						 =      [60]
      _UpperCAmelCase						 =      [10]
      _UpperCAmelCase						 =      len(__lowerCAmelCase					)
      self.assertEqual(k.knapsack(__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase					)   ,				0					)


    def      lowerCAmelCase_  (					self	:  Optional[int]					):
      _UpperCAmelCase						 =      3
      _UpperCAmelCase						 =      [1, 2, 3]
      _UpperCAmelCase						 =      [3, 2, 1]
      _UpperCAmelCase						 =      len(__lowerCAmelCase					)
      self.assertEqual(k.knapsack(__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase					)   ,				5					)


    def      lowerCAmelCase_  (					self	:  Optional[Any]					):
      _UpperCAmelCase						 =      50
      _UpperCAmelCase						 =      [60, 100, 120]
      _UpperCAmelCase						 =      [10, 20, 30]
      _UpperCAmelCase						 =      len(__lowerCAmelCase					)
      self.assertEqual(k.knapsack(__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase   ,				__lowerCAmelCase					)   ,				220					)


if __name__ == "__main__":
    unittest.main()
