1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| #! python 3
# coding: utf-8
from termcolor import cprint
from typing import List
def diviseurs(a: int = 2, b: int = 2) -> List[int]:
"""Liste des diviseurs des nombres entiers a et b"""
if a > 1 and b > 1:
lst = []
for n in range(min(a, b), 0, -1):
if (a % n == 0) and (b % n == 0):
lst.append(n)
return |