maxim_shlyahtin

E

Nov 26th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. s2, s1, s = [], [], list(map(int, input().split()))
  2. for i in range(len(s)):
  3.     for j in range(len(s)):
  4.         if i != j:
  5.             s1.append((s[i], s[j], s[i] * s[j]))
  6. for i in range(len(s1)):
  7.     for j in range(len(s1)):
  8.         if i != j and s1[i][0] not in s1[j] and s1[i][1] not in s1[j]:
  9.             s2.append(s1[i][2] + s1[j][2])
  10. print(max(s2))
Add Comment
Please, Sign In to add comment