結果
| 問題 |
No.693 square1001 and Permutation 2
|
| コンテスト | |
| ユーザー |
simamumu
|
| 提出日時 | 2018-06-29 20:08:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 2,000 ms |
| コード長 | 185 bytes |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 82,428 KB |
| 実行使用メモリ | 54,996 KB |
| 最終ジャッジ日時 | 2024-06-30 23:53:14 |
| 合計ジャッジ時間 | 1,219 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
import sys from collections import defaultdict N = int(input()) a_li = list(map(int,input().split())) a_li.sort() ans = 0 for i in range(N): ans += abs(i+1 - a_li[i]) print(ans)
simamumu