結果

問題 No.406 鴨等間隔の法則
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2020-11-07 18:48:45
言語 Ruby
(3.3.0)
結果
AC  
実行時間 173 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 54 ms
コンパイル使用メモリ 11,388 KB
実行使用メモリ 25,888 KB
最終ジャッジ日時 2023-09-29 20:45:15
合計ジャッジ時間 5,227 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
18,408 KB
testcase_01 AC 79 ms
15,124 KB
testcase_02 AC 80 ms
15,332 KB
testcase_03 AC 80 ms
15,088 KB
testcase_04 AC 131 ms
22,620 KB
testcase_05 AC 99 ms
17,788 KB
testcase_06 AC 99 ms
17,992 KB
testcase_07 AC 100 ms
18,104 KB
testcase_08 AC 127 ms
22,360 KB
testcase_09 AC 141 ms
23,500 KB
testcase_10 AC 102 ms
18,220 KB
testcase_11 AC 121 ms
21,456 KB
testcase_12 AC 109 ms
19,272 KB
testcase_13 AC 105 ms
18,920 KB
testcase_14 AC 152 ms
21,724 KB
testcase_15 AC 82 ms
15,532 KB
testcase_16 AC 82 ms
15,528 KB
testcase_17 AC 80 ms
15,352 KB
testcase_18 AC 82 ms
15,264 KB
testcase_19 AC 87 ms
15,544 KB
testcase_20 AC 90 ms
16,192 KB
testcase_21 AC 86 ms
15,864 KB
testcase_22 AC 97 ms
16,724 KB
testcase_23 AC 109 ms
19,492 KB
testcase_24 AC 144 ms
21,524 KB
testcase_25 AC 143 ms
23,568 KB
testcase_26 AC 173 ms
25,888 KB
testcase_27 AC 131 ms
23,308 KB
testcase_28 AC 129 ms
23,424 KB
testcase_29 AC 171 ms
25,712 KB
testcase_30 AC 169 ms
25,844 KB
testcase_31 AC 140 ms
23,184 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
puts (K = gets.split.map(&:to_i).sort).each_cons(2).all?{|x| x[1] - x[0] == K[1] - K[0] && K[1] - K[0] != 0} ? "YES" : "NO"
0