CSES - HIIT Open 2019 - Results
Submission details
Task:Differences
Sender:Piltit
Submission time:2019-05-25 11:45:11 +0300
Language:Python3
Status:READY
Result:ACCEPTED
Test results
testverdicttime
#1ACCEPTED0.26 sdetails

Code

n = input()
a = sorted(map(int, input().split()))
b = sorted(map(int, input().split()))
c = 0

for i in zip(a, b):
		c += abs((i[0]-i[1]))

print(c)

Test details

Test 1

Verdict: ACCEPTED

input
100000
880024238 421943433 201872615 ...

correct output
79489641069

user output
79489641069