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

Code

n = int(input())
a = sorted(map(int, input().split()))
b = sorted(map(int, input().split()))
s = 0
for i in range(n):
	s += abs(a[i] - b[i])
print(s)

Test details

Test 1

Verdict: ACCEPTED

input
100000
880024238 421943433 201872615 ...

correct output
79489641069

user output
79489641069