結果
| 問題 | No.693 square1001 and Permutation 2 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-09-28 15:20:51 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 162 bytes | 
| コンパイル時間 | 139 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-10-12 04:50:44 | 
| 合計ジャッジ時間 | 917 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 5 WA * 4 | 
ソースコード
n = int(input())
l = [int(_) for _ in input().split()]
l = sorted(l)
nl = [i+1 for i in range(n)]
ans = 0
for i in range(n):
    ans += nl[i] - l[i]
print(ans)
            
            
            
        