0
|
Posté par mostdu95
ah oui super merci bien Laras
|
|
Posté par ghghgh
ax+by=c t'aurai pas d'idees??
où c est le pgcd de a et b ? dans ce cas : EUCLIDE-ETENDU(a,b) si b = 0 alors retourner(a,1,0) (c',x',y') <- EUCLIDE-ETENDU(b, a mod b) (c,x,y) <- (d',y',x' - partie_entière(a/b)y') retourner (d,x,y) donc, ton algo prend en entrée une paire, et te renvoie un triplet :) le pgcd, c, puis ton x et y, de là tu as ton équation ax+by = c |
0 ??
-