結果
| 問題 | No.693 square1001 and Permutation 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-02 16:29:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 2,000 ms |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 82,484 KB |
| 実行使用メモリ | 53,580 KB |
| 最終ジャッジ日時 | 2025-12-02 16:30:00 |
| 合計ジャッジ時間 | 1,623 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
import sys
from itertools import count
def input(): return sys.stdin.readline().rstrip('\n')
def main():
n = int(input())
a = sorted(map(int, input().split()))
print(sum(abs(i - j) for i, j in zip(a, count(1))))
if __name__ == '__main__':
main()