Code: Select all
from typing import NamedTuple
from functools import cached_property
class NT(NamedTuple):
a: int
b: int
@property
def primefactors_a(self):
n = self.a
if n < 2:
return []
factors = []
d = 2
while dCode: Select all
from typing import NamedTuple
from functools import cached_property
class NT(NamedTuple):
a: int
b: int
@property
def primefactors_a(self):
n = self.a
if n < 2:
return []
factors = []
d = 2
while d