結果

問題 No.609 Noelちゃんと星々
ユーザー cielciel
提出日時 2017-12-09 20:14:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 71 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 21,632 KB
最終ジャッジ日時 2024-05-07 12:40:39
合計ジャッジ時間 4,401 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
18,816 KB
testcase_01 AC 108 ms
15,488 KB
testcase_02 AC 99 ms
14,080 KB
testcase_03 AC 104 ms
14,976 KB
testcase_04 AC 89 ms
13,184 KB
testcase_05 AC 149 ms
21,120 KB
testcase_06 AC 148 ms
19,328 KB
testcase_07 AC 119 ms
16,512 KB
testcase_08 AC 88 ms
12,672 KB
testcase_09 AC 105 ms
14,464 KB
testcase_10 AC 130 ms
17,664 KB
testcase_11 AC 119 ms
16,896 KB
testcase_12 AC 134 ms
18,176 KB
testcase_13 AC 90 ms
12,928 KB
testcase_14 AC 81 ms
12,288 KB
testcase_15 AC 141 ms
19,456 KB
testcase_16 AC 157 ms
21,376 KB
testcase_17 AC 143 ms
18,944 KB
testcase_18 AC 108 ms
14,208 KB
testcase_19 AC 146 ms
19,328 KB
testcase_20 AC 156 ms
21,632 KB
testcase_21 AC 154 ms
21,504 KB
testcase_22 AC 153 ms
21,632 KB
testcase_23 AC 150 ms
21,504 KB
testcase_24 AC 156 ms
21,504 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,*a=`dd`.split.map &:to_i;x=a.sort[n/2];r=0;a.map{|e|r+=(e-x).abs};p r
0