結果
| 問題 | No.693 square1001 and Permutation 2 |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-19 02:47:36 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 522 ms / 2,000 ms |
| コード長 | 269 bytes |
| 記録 | |
| コンパイル時間 | 408 ms |
| コンパイル使用メモリ | 20,704 KB |
| 実行使用メモリ | 35,016 KB |
| 最終ジャッジ日時 | 2026-03-17 17:48:21 |
| 合計ジャッジ時間 | 8,440 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
maspy