結果

問題 No.406 鴨等間隔の法則
ユーザー nebukuro09nebukuro09
提出日時 2016-09-09 09:39:41
言語 Python2
(2.7.18)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 142 bytes
コンパイル時間 692 ms
コンパイル使用メモリ 6,752 KB
実行使用メモリ 14,748 KB
最終ジャッジ日時 2023-09-21 18:09:40
合計ジャッジ時間 3,458 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
9,400 KB
testcase_01 AC 11 ms
6,144 KB
testcase_02 AC 11 ms
6,152 KB
testcase_03 AC 11 ms
5,984 KB
testcase_04 AC 92 ms
13,768 KB
testcase_05 AC 39 ms
8,672 KB
testcase_06 AC 41 ms
8,920 KB
testcase_07 AC 42 ms
9,020 KB
testcase_08 AC 92 ms
13,648 KB
testcase_09 AC 101 ms
14,544 KB
testcase_10 AC 46 ms
9,448 KB
testcase_11 AC 80 ms
12,716 KB
testcase_12 AC 55 ms
10,132 KB
testcase_13 AC 50 ms
10,044 KB
testcase_14 AC 99 ms
13,264 KB
testcase_15 AC 14 ms
6,364 KB
testcase_16 AC 17 ms
6,632 KB
testcase_17 AC 14 ms
6,372 KB
testcase_18 AC 16 ms
6,552 KB
testcase_19 AC 19 ms
6,764 KB
testcase_20 AC 23 ms
6,812 KB
testcase_21 AC 21 ms
6,728 KB
testcase_22 AC 33 ms
7,796 KB
testcase_23 AC 58 ms
10,560 KB
testcase_24 AC 86 ms
12,348 KB
testcase_25 AC 102 ms
14,716 KB
testcase_26 AC 119 ms
14,640 KB
testcase_27 AC 77 ms
14,748 KB
testcase_28 AC 63 ms
14,744 KB
testcase_29 AC 120 ms
14,564 KB
testcase_30 AC 116 ms
14,388 KB
testcase_31 AC 98 ms
14,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()-1
x = sorted(map(int, raw_input().split()))
print 'YES' if all(x[i+1]-x[i]==x[1]-x[0] for i in xrange(N)) and x[1]!=x[0] else 'NO'
0