Created
September 2, 2018 07:20
-
-
Save qkreltms/bee416489888a856c882ee3f1cdc0bcf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| L = int(input()) | |
| A = sorted(list(map(int, input().split()))) | |
| B = sorted(list(map(int, input().split())), reverse=True) | |
| B = B[L-len(B):] | |
| S = sum([A[i] * B[i] for i in range(L)]) | |
| print(S) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment