





import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu



@require_cpu
class    A__  (			unittest.TestCase     ):





      def 			__UpperCamelCase(					self  ):
       '''simple docstring'''




       UpperCamelCase      :   str			      =  torch.nn.Linear(10			,				10  )
       UpperCamelCase      :   int			      =  torch.optim.SGD(model.parameters()			,				0.1  )
       UpperCamelCase      :   str			      =  Accelerator()
       UpperCamelCase      :   Union[str, Any]			      =  accelerator.prepare(A_  )
       try:
        pickle.loads(pickle.dumps(A_  )  )
       except Exception as e:
        self.fail(F"""Accelerated optimizer pickling failed with {e}"""  )
       AcceleratorState._reset_state()







def 						A_							(	_lowerCAmelCase = 1000	)		->					int:
 UpperCamelCase      :   Optional[int]			      =  -1
 UpperCamelCase      :   int			      =  0
 for a in range(1				,  n // 3	):
  # Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c
  UpperCamelCase      :   Optional[Any]			      =  (n * n - 2 * a * n) // (2 * n - 2 * a)
  UpperCamelCase      :   List[str]			      =  n - a - b
  if c * c == (a * a + b * b):
   UpperCamelCase      :   Union[str, Any]			      =  a * b * c
   if candidate >= product:
    UpperCamelCase      :   Tuple			      =  candidate
 return product


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