Task: | Differences |
Sender: | Omochiikaeri~! |
Submission time: | 2019-05-25 11:46:39 +0300 |
Language: | Python3 |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.24 s | details |
Code
n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) def f (t): return abs(t[0]-t[1]) print(sum(map(f, zip(sorted(a), sorted(b)))))