| Task: | Differences |
| Sender: | Haapsaari |
| Submission time: | 2019-05-25 11:53:16 +0300 |
| Language: | Python3 |
| Status: | READY |
| Result: | ACCEPTED |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.27 s | details |
Code
n = int(input())
a,b = list(map(lambda x: int(x), input().split(' '))), list(map(lambda x: int(x), input().split(' ')))
a.sort()
b.sort()
c = [abs(a[i] - b[i]) for i in range(len(a))]
print(sum(c))
