Code Python : Sélectionner tout - Visualiser dans une fenêtre à part 123456789101112131415#! 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 ...
#! 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