結果

問題 No.406 鴨等間隔の法則
ユーザー cympfhcympfh
提出日時 2016-08-27 22:56:17
言語 Ruby
(3.3.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 107 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 11,484 KB
実行使用メモリ 23,688 KB
最終ジャッジ日時 2023-09-21 18:04:39
合計ジャッジ時間 5,358 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
18,220 KB
testcase_01 AC 83 ms
15,136 KB
testcase_02 AC 82 ms
15,120 KB
testcase_03 AC 82 ms
15,300 KB
testcase_04 AC 134 ms
22,388 KB
testcase_05 AC 103 ms
17,892 KB
testcase_06 AC 104 ms
17,908 KB
testcase_07 AC 105 ms
18,024 KB
testcase_08 AC 131 ms
22,400 KB
testcase_09 AC 143 ms
23,428 KB
testcase_10 AC 107 ms
18,392 KB
testcase_11 AC 126 ms
21,496 KB
testcase_12 AC 113 ms
19,248 KB
testcase_13 AC 109 ms
18,976 KB
testcase_14 AC 138 ms
21,716 KB
testcase_15 AC 87 ms
15,412 KB
testcase_16 AC 86 ms
15,352 KB
testcase_17 AC 84 ms
15,516 KB
testcase_18 AC 86 ms
15,456 KB
testcase_19 AC 90 ms
15,432 KB
testcase_20 AC 91 ms
15,932 KB
testcase_21 AC 90 ms
15,832 KB
testcase_22 AC 94 ms
16,788 KB
testcase_23 AC 112 ms
19,752 KB
testcase_24 AC 130 ms
20,944 KB
testcase_25 AC 144 ms
23,544 KB
testcase_26 AC 158 ms
23,688 KB
testcase_27 AC 134 ms
23,376 KB
testcase_28 AC 135 ms
23,500 KB
testcase_29 AC 157 ms
23,400 KB
testcase_30 AC 156 ms
23,316 KB
testcase_31 AC 143 ms
23,136 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets;a=gets.split.map(&:to_i).sort
puts a[0]<a[1]&&(0..a.size-3).all?{|i|a[i]+a[i+2]==2*a[i+1]}? :YES : :NO
0