"""simple docstring"""




from __future__ import annotations

import typing
from collections import Counter





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       int	)       ->      typing.Counter[int]:
  _lowerCAmelCase						:       typing.Counter[int]  			=     Counter()
  for base in range(1			,max_perimeter + 1	):
    for perpendicular in range(_lowerCamelCase			,max_perimeter + 1	):
      _lowerCAmelCase						:       Optional[int]  			=     (base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(_lowerCamelCase	):
        _lowerCAmelCase						:       Union[str, Any]  			=     int(base + perpendicular + hypotenuse	)
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       int = 1000	)       ->      int:
  _lowerCAmelCase						:       int  			=     pythagorean_triple(_lowerCamelCase	)
  return triplets.most_common(1	)[0][0]


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





"""simple docstring"""




from math import ceil





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       Union[str, Any]			,_lowerCamelCase						:       Union[str, Any]	)       ->      int:
  _lowerCAmelCase						:       Dict  			=     list(range(0			,_lowerCamelCase	)	)

  _lowerCAmelCase						:       Tuple  			=     [item for sublist in list(device_map.values()	) for item in sublist]

  # Duplicate check
  _lowerCAmelCase						:       Union[str, Any]  			=     []
  for i in device_map_blocks:
    if device_map_blocks.count(_lowerCamelCase	) > 1 and i not in duplicate_blocks:
      duplicate_blocks.append(_lowerCamelCase	)
    # Missing blocks
  _lowerCAmelCase						:       int  			=     [i for i in blocks if i not in device_map_blocks]
  _lowerCAmelCase						:       List[Any]  			=     [i for i in device_map_blocks if i not in blocks]

  if len(_lowerCamelCase	) != 0:
    raise ValueError(
        """Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device."""
        """ These attention blocks were specified more than once: """ + str(_lowerCamelCase	)	)
  if len(_lowerCamelCase	) != 0:
    raise ValueError(
        """There are attention blocks for this model that are not specified in the device_map. Add these attention """
        """blocks to a device on the device_map: """ + str(_lowerCamelCase	)	)
  if len(_lowerCamelCase	) != 0:
    raise ValueError(
        """The device_map contains more attention blocks than this model has. Remove these from the device_map:"""
        + str(_lowerCamelCase	)	)






def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       int			,_lowerCamelCase						:       Tuple	)       ->      str:
  _lowerCAmelCase						:       Optional[Any]  			=     list(range(_lowerCamelCase	)	)
  _lowerCAmelCase						:       Optional[Any]  			=     int(ceil(n_layers / len(_lowerCamelCase	)	)	)
  _lowerCAmelCase						:       Optional[int]  			=     [layers[i : i + n_blocks] for i in range(0			,_lowerCamelCase			,_lowerCamelCase	)]

  return dict(zip(_lowerCamelCase			,_lowerCamelCase	)	)




