Advertisement
Guest User

1

a guest
Dec 15th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. a=int(input())
  2. b=int(input())
  3. n=int(input())
  4. m=int(input())
  5. if(a>b):
  6.     minTime=1+a*(n-1)+1
  7.     maxTime=a*n+n-1
  8. else:
  9.     minTime=1+b*(m-1)+1
  10.     maxTime=b*m+m-1
  11. print(minTime, maxTime)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement