Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente | |||
| teaching:progappchim:algos_entiers [2023/01/10 09:00] – [Factorisation en nombres premiers] villersd | teaching:progappchim:algos_entiers [2023/01/10 09:04] (Version actuelle) – villersd | ||
|---|---|---|---|
| Ligne 137: | Ligne 137: | ||
| * librairie sympy → pip install sympy (ou conda install sympy) | * librairie sympy → pip install sympy (ou conda install sympy) | ||
| * Use the function sympy.ntheory.factorint : "Given a positive integer n, factorint(n) returns a dict containing the prime factors of n as keys and their respective multiplicities as values." | * Use the function sympy.ntheory.factorint : "Given a positive integer n, factorint(n) returns a dict containing the prime factors of n as keys and their respective multiplicities as values." | ||
| - | * from sympy.ntheory import factorint | + | <code python> |
| - | | + | from sympy.ntheory import factorint |
| + | factorint(10**20+1) → {73: 1, 5964848081: 1, 1676321: 1, 137: 1} | ||
| + | </ | ||
| ===== Références ===== | ===== Références ===== | ||
| * [[http:// | * [[http:// | ||