結果

問題 No.609 Noelちゃんと星々
ユーザー 0w10w1
提出日時 2017-12-14 12:30:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 95 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 11,416 KB
実行使用メモリ 23,832 KB
最終ジャッジ日時 2023-08-21 04:09:04
合計ジャッジ時間 5,149 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
21,668 KB
testcase_01 AC 108 ms
18,176 KB
testcase_02 AC 100 ms
16,972 KB
testcase_03 AC 112 ms
18,020 KB
testcase_04 AC 97 ms
16,492 KB
testcase_05 AC 153 ms
23,028 KB
testcase_06 AC 135 ms
21,776 KB
testcase_07 AC 114 ms
19,208 KB
testcase_08 AC 87 ms
15,680 KB
testcase_09 AC 104 ms
17,472 KB
testcase_10 AC 122 ms
20,060 KB
testcase_11 AC 120 ms
19,696 KB
testcase_12 AC 130 ms
20,768 KB
testcase_13 AC 90 ms
16,020 KB
testcase_14 AC 84 ms
15,384 KB
testcase_15 AC 138 ms
21,916 KB
testcase_16 AC 154 ms
23,328 KB
testcase_17 AC 132 ms
21,644 KB
testcase_18 AC 101 ms
17,096 KB
testcase_19 AC 134 ms
21,904 KB
testcase_20 AC 154 ms
23,628 KB
testcase_21 AC 157 ms
23,540 KB
testcase_22 AC 158 ms
23,776 KB
testcase_23 AC 155 ms
23,628 KB
testcase_24 AC 155 ms
23,832 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.split.map(&:to_i).sort
puts a.map { |v| (v - a[n / 2]).abs } .reduce(:+)
0