fork download
  1. # your code goes here
  2. from math import lcm
  3. def UCLN (x,y):
  4. return x*y//lcm(x,y)
  5. a = int(input('a = '))
  6. print (a)
  7. b = int(input('b = '))
  8. print (b)
  9. print ('Ước chung lớn nhất: ',UCLN(a,b))
  10. c = a + b + UCLN(a,b)
  11. print ('c = ',c)
Success #stdin #stdout 0.04s 9972KB
stdin
4965
45
stdout
a = 4965
b = 45
Ước chung lớn nhất:  15
c =  5025