結果

問題 No.406 鴨等間隔の法則
ユーザー cielciel
提出日時 2016-08-05 22:44:37
言語 Ruby
(3.3.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 102 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 11,576 KB
実行使用メモリ 25,568 KB
最終ジャッジ日時 2023-09-21 17:46:31
合計ジャッジ時間 5,177 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
19,108 KB
testcase_01 AC 77 ms
15,144 KB
testcase_02 AC 77 ms
15,288 KB
testcase_03 AC 74 ms
15,412 KB
testcase_04 AC 143 ms
24,384 KB
testcase_05 AC 106 ms
18,484 KB
testcase_06 AC 103 ms
18,820 KB
testcase_07 AC 106 ms
18,768 KB
testcase_08 AC 142 ms
24,012 KB
testcase_09 AC 156 ms
25,416 KB
testcase_10 AC 107 ms
19,028 KB
testcase_11 AC 132 ms
22,172 KB
testcase_12 AC 114 ms
19,636 KB
testcase_13 AC 111 ms
19,396 KB
testcase_14 AC 137 ms
22,504 KB
testcase_15 AC 80 ms
15,548 KB
testcase_16 AC 81 ms
15,564 KB
testcase_17 AC 79 ms
15,564 KB
testcase_18 AC 80 ms
15,704 KB
testcase_19 AC 82 ms
15,568 KB
testcase_20 AC 85 ms
16,104 KB
testcase_21 AC 85 ms
16,112 KB
testcase_22 AC 91 ms
16,888 KB
testcase_23 AC 117 ms
20,040 KB
testcase_24 AC 130 ms
21,564 KB
testcase_25 AC 157 ms
25,420 KB
testcase_26 AC 155 ms
25,324 KB
testcase_27 AC 143 ms
25,336 KB
testcase_28 AC 147 ms
25,568 KB
testcase_29 AC 158 ms
25,168 KB
testcase_30 AC 153 ms
25,048 KB
testcase_31 AC 154 ms
25,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
a=gets.split.map(&:to_i).sort.each_cons(2).map{|x,y|y-x}.uniq
puts a.size==1&&a[0]>0 ? :YES : :NO
0