結果
| 問題 |
No.693 square1001 and Permutation 2
|
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2018-06-15 10:02:50 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 124 bytes |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 6,940 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 14:42:34 |
| 合計ジャッジ時間 | 882 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
n = int(raw_input())
a = map(int, raw_input().split())
a.sort()
s = 0
for i in range(1,n+1):
s += abs(i-a[i-1])
print s
JunOnuma