

def 					lowerCAmelCase__							(	SCREAMING_SNAKE_CASE_:							int      )			->      List[str]:




				'''simple docstring'''





				return sum(i for i in range(1	,       number // 2 + 1      ) if number % i == 0      ) == number


if __name__ == "__main__":
	print("""Program to check whether a number is a Perfect number or not...""")
	lowerCAmelCase__	   = int(input("""Enter number: """).strip())
	print(f"""{number} is {'' if perfect(number) else 'not '}a Perfect Number.""")




from typing import Union

import fire
import torch
from tqdm import tqdm



def 					lowerCAmelCase__							(	SCREAMING_SNAKE_CASE_:							str	,       SCREAMING_SNAKE_CASE_:							str = "cpu"	,       SCREAMING_SNAKE_CASE_:							Union[str, None] = None      )			->      None:




				'''simple docstring'''





				A__        =			torch.load(SCREAMING_SNAKE_CASE_	,       map_location=SCREAMING_SNAKE_CASE_      )
				for k, v in tqdm(state_dict.items()      ):
								if not isinstance(SCREAMING_SNAKE_CASE_	,       torch.Tensor      ):
												raise TypeError("FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin"      )
								A__        =			v.half()
				if save_path is None:  # overwrite src_path
								A__        =			src_path
				torch.save(SCREAMING_SNAKE_CASE_	,       SCREAMING_SNAKE_CASE_      )


if __name__ == "__main__":
	fire.Fire(convert)

