結果
| 問題 |
No.693 square1001 and Permutation 2
|
| コンテスト | |
| ユーザー |
hiragn
|
| 提出日時 | 2022-11-10 19:30:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 171 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-23 20:54:00 |
| 合計ジャッジ時間 | 1,164 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 9 |
ソースコード
def main():
_ = int(input())
arr = sorted(list(map(int, input().split())))
ans = 0
for i, x in enumerate(arr, 1):
ans += abs(i - x)
print(ans)
hiragn