## Number of walnuts

DaLongggggg 2021-04-07 23:11:54
number walnuts

# Problem description

Xiao Zhang is a software project manager , He led 3 A development team . Tight schedule , I'm working overtime today . To boost morale , Xiao Zhang is going to give each group a bag of walnuts （ Rumor has it that it can nourish the brain ）. His request is ：

1. Each group must have the same number of walnuts

2. Each group must be equally divided （ Of course, it can't be broken ）

3. Try to provide satisfaction 1,2 The minimum number of conditions （ Economy and revolution ）

# Input format

The input contains three positive integers a, b, c, Represents the number of people in each group who are working overtime , Separate with spaces （a,b,c<30）

# Output format

Output a positive integer , Represents the number of walnuts per bag .

2 4 5

# Sample output 1

20

``a,b,c=map(int,input().split())list=[]if a<30 and b<30 and c<30: sum=a*b*c for i in range(1,sum+1): if i%a==0 and i%b==0 and i%c==0: list.append(i)print(list[0])``

The key word of the title is the least common multiple, which should be the same for each group , Each group should be equally divided to make all the people multiply Find the common multiple The real title of the Blue Bridge Cup The number of walnuts python Answer key

https://pythonmana.com/2021/04/20210407231057373j.html