結果

問題 No.1279 Array Battle
ユーザー nehan_der_thal
提出日時 2020-11-06 22:17:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 54,028 KB
最終ジャッジ日時 2024-07-22 13:03:33
合計ジャッジ時間 1,656 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

N, = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
X.sort()
Y.sort()
X=X[::-1]
R = 0
for i in range(N):
    x,y=X[i],Y[i]
    if x>y:
        R+=x-y
print(R)

0