



'''simple docstring'''



from __future__ import annotations

import math
import random



def       UpperCAmelCase__ (     UpperCAmelCase_   :    Union[str, Any]				,   UpperCAmelCase_   :    Optional[Any]				,   UpperCAmelCase_   :    str							)					->		list[int]:
     __lowerCamelCase       :     Dict        =		d * e - 1
     __lowerCamelCase       :     List[Any]        =		0
     __lowerCamelCase       :     List[str]        =		0
     while p == 0:
          __lowerCamelCase       :     List[Any]        =		random.randint(2				,   n - 1							)
          __lowerCamelCase       :     Tuple        =		k
          while True:
               if t % 2 == 0:
                    __lowerCamelCase       :     List[str]        =		t // 2
                    __lowerCamelCase       :     Any        =		(g**t) % n
                    __lowerCamelCase       :     str        =		math.gcd(x - 1				,   _SCREAMING_SNAKE_CASE							)
                    if x > 1 and y > 1:
                         __lowerCamelCase       :     Union[str, Any]        =		y
                         __lowerCamelCase       :     Dict        =		n // y
                         break  # find the correct factors
               else:
                    break  # t is not divisible by 2, break and choose another g
     return sorted([p, q]							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()










'''simple docstring'''



def       UpperCAmelCase__ (     UpperCAmelCase_   :    int = 4_00_00_00							)					->		int:
     __lowerCamelCase       :     int        =		1
     __lowerCamelCase       :     Union[str, Any]        =		2
     __lowerCamelCase       :     Optional[int]        =		0
     while j <= n:
          if j % 2 == 0:
               total += j
          __lowerCamelCase    ,	__lowerCamelCase       :     List[Any]        =		j, i + j

     return total


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






