Advertisement
FanaticExplorer

eolymp_problem_8644

Aug 8th, 2022
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. import math
  2.  
  3. n,m,k = map(int, input().split())
  4.  
  5. nsk = math.lcm(n, m, k)
  6.  
  7. i=max(n,m,k)
  8. while 1:
  9.     if (i%n!=0) and (i%m!=0) and (i%k!=0):
  10.         print(nsk, i+1)
  11.         break
  12.     else:
  13.         i=i+1
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement