結果

問題 No.693 square1001 and Permutation 2
ユーザー gew1fw
提出日時 2025-06-12 16:59:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 136 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 82,512 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2025-06-12 16:59:41
合計ジャッジ時間 1,237 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
a.sort()
total = 0
for i in range(n):
    total += abs(a[i] - (i + 1))
print(total)
0