結果

問題 No.609 Noelちゃんと星々
ユーザー masaktmasakt
提出日時 2017-12-09 17:15:48
言語 Ruby
(3.3.0)
結果
AC  
実行時間 184 ms / 2,000 ms
コード長 64 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 11,424 KB
実行使用メモリ 24,552 KB
最終ジャッジ日時 2023-08-20 05:16:03
合計ジャッジ時間 5,077 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 153 ms
21,988 KB
testcase_01 AC 119 ms
18,332 KB
testcase_02 AC 116 ms
17,332 KB
testcase_03 AC 120 ms
18,188 KB
testcase_04 AC 102 ms
16,376 KB
testcase_05 AC 175 ms
23,800 KB
testcase_06 AC 158 ms
22,436 KB
testcase_07 AC 129 ms
19,532 KB
testcase_08 AC 96 ms
15,744 KB
testcase_09 AC 118 ms
17,700 KB
testcase_10 AC 140 ms
20,688 KB
testcase_11 AC 137 ms
20,156 KB
testcase_12 AC 148 ms
21,384 KB
testcase_13 AC 99 ms
15,856 KB
testcase_14 AC 92 ms
15,480 KB
testcase_15 AC 158 ms
22,528 KB
testcase_16 AC 176 ms
24,092 KB
testcase_17 AC 151 ms
22,172 KB
testcase_18 AC 112 ms
17,144 KB
testcase_19 AC 158 ms
22,516 KB
testcase_20 AC 174 ms
24,432 KB
testcase_21 AC 181 ms
24,552 KB
testcase_22 AC 181 ms
24,436 KB
testcase_23 AC 177 ms
24,416 KB
testcase_24 AC 184 ms
24,416 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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