結果
問題 | No.693 square1001 and Permutation 2 |
ユーザー |
![]() |
提出日時 | 2022-03-08 21:42:42 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 203 bytes |
コンパイル時間 | 2,032 ms |
コンパイル使用メモリ | 215,280 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 14:33:10 |
合計ジャッジ時間 | 2,466 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
import std;void main() {int N;readf("%d\n", N);auto A = readln.chomp.split.to!(int[]);A.sort;int res;foreach (i, a; A) res += abs(a - i.to!int - 1);res.writeln;}