SHARE
TWEET

Máximo divisor comum(m.d.c.)

jpvieiraa Jul 3rd, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a,c=map(int,input().split())
  2. b=0
  3. v=[]
  4. p=0
  5. maior=-99999999999999
  6. if(a>=1 and c<=10000):
  7.  
  8.     while(b!=10000):
  9.         b=b+1
  10.         if(a%b==0 and c%b==0):
  11.             v.append(b)
  12.             p=p+1
  13.     for i in range(p):
  14.         if(v[i]>maior):
  15.             maior=v[i]
  16.     print("m.d.c(12,18)={}".format(maior))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top