結果
| 問題 | No.693 square1001 and Permutation 2 | 
| コンテスト | |
| ユーザー |  maspy | 
| 提出日時 | 2020-01-19 02:47:36 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 462 ms / 2,000 ms | 
| コード長 | 269 bytes | 
| コンパイル時間 | 103 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 44,616 KB | 
| 最終ジャッジ日時 | 2024-06-28 18:00:01 | 
| 合計ジャッジ時間 | 6,322 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 9 | 
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np N = int(readline()) A = np.array(read().split(),np.int64) A.sort() x = np.arange(1,N+1) - A answer = np.abs(x).sum() print(answer)
