Đăng nhập để hỏi chi tiết
5
0
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
8011
4556
from math import *
from itertools import *
a = int(input())
b = int(input())
c = int(input())
msc = lcm(a,b,c)
fracs = list(permutations([a,b,c],2))
fracs = [(i[0]*(msc // i[1]),msc) for i in fracs]
fracs.sort(key=lambda e: e[0])
g = gcd(fracs[0][0], fracs[0][1])
print(fracs[0][0] // g + fracs[0][1] // g)
$\\$
`\bb\color{#33a4f5}{\text{@hoanganhnguyen09302}}`
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin