Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1. a = int(input())
  2. b = int(input())
  3. c = int(input())
  4. d = int(input())
  5. e = int(input())
  6. f = int(input())
  7. two1 = 0
  8. two2 = 0
  9. if min(a, b, c) == a:
  10.     two1 = min(b, c)
  11. elif min(a, b, c) == b:
  12.     two1 = min(a, c)
  13. else:
  14.     two1 = min(a, b)
  15. if min(d, e, f) == d:
  16.     two2 = min(e, f)
  17. elif min(d, e, f) == e:
  18.     two2 = min(d, f)
  19. else:
  20.     two2 = min(d, e)
  21. res = 0
  22. ans = min(a, b, c) // min(d, e, f)
  23. ans *= two1 // two2
  24. ans *= max(a, b, c) // max(d, e, f)
  25. res = max(res, ans)
  26.  
  27. ans = two1 // min(d, e, f)
  28. ans *= min(a, b, c)  // two2
  29. ans *= max(a, b, c) // max(d, e, f)
  30. res = max(res, ans)
  31.  
  32. ans = min(a, b, c) // min(d, e, f)
  33. ans *= max(a, b, c) // two2
  34. ans *= two1 // max(d, e, f)
  35. res = max(res, ans)
  36.  
  37. ans = two1 // min(d, e, f)
  38. ans *= max(a, b, c)  // two2
  39. ans *= min(a, b, c) // max(d, e, f)
  40. res = max(res, ans)
  41.  
  42. ans = max(a, b, c) // min(d, e, f)
  43. ans *= two1 // two2
  44. ans *= min(a, b, c) // max(d, e, f)
  45. res = max(res, ans)
  46.  
  47. ans = max(a, b, c) // min(d, e, f)
  48. ans *= min(a, b, c) // two2
  49. ans *= two1 // max(d, e, f)
  50. res = max(res, ans)
  51.  
  52. print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement