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

Code

try:

	while True:
		n = int(input())
		a = sorted(list(map(int, input().split())))
		b = sorted(list(map(int, input().split())))
		summa = 0
		
		for x in range(len(a)):
			summa += abs(a[x]-b[x])

		print(summa)

	
except EOFError:
	exit()
	

Test details

Test 1

Verdict: ACCEPTED

input
100000
880024238 421943433 201872615 ...

correct output
79489641069

user output
79489641069