結果

問題 No.406 鴨等間隔の法則
ユーザー JunOnumaJunOnuma
提出日時 2017-06-08 15:37:48
言語 Python2
(2.7.18)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 6,728 KB
実行使用メモリ 14,536 KB
最終ジャッジ日時 2023-09-21 18:29:08
合計ジャッジ時間 3,656 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
9,372 KB
testcase_01 AC 11 ms
5,976 KB
testcase_02 AC 11 ms
5,988 KB
testcase_03 AC 11 ms
5,964 KB
testcase_04 AC 89 ms
13,708 KB
testcase_05 AC 38 ms
8,664 KB
testcase_06 AC 40 ms
8,792 KB
testcase_07 AC 40 ms
8,940 KB
testcase_08 AC 89 ms
13,640 KB
testcase_09 AC 98 ms
14,396 KB
testcase_10 AC 44 ms
9,380 KB
testcase_11 AC 77 ms
12,312 KB
testcase_12 AC 52 ms
10,008 KB
testcase_13 AC 49 ms
9,828 KB
testcase_14 AC 97 ms
13,064 KB
testcase_15 AC 13 ms
6,132 KB
testcase_16 AC 15 ms
6,436 KB
testcase_17 AC 12 ms
6,124 KB
testcase_18 AC 14 ms
6,420 KB
testcase_19 AC 18 ms
6,476 KB
testcase_20 AC 22 ms
6,660 KB
testcase_21 AC 20 ms
6,780 KB
testcase_22 AC 32 ms
7,644 KB
testcase_23 AC 55 ms
10,380 KB
testcase_24 AC 88 ms
12,196 KB
testcase_25 AC 98 ms
14,536 KB
testcase_26 AC 119 ms
14,500 KB
testcase_27 AC 61 ms
14,528 KB
testcase_28 AC 61 ms
14,500 KB
testcase_29 AC 122 ms
14,500 KB
testcase_30 AC 118 ms
14,328 KB
testcase_31 AC 93 ms
14,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
l = map(int, raw_input().split())
l.sort()
d = l[1] - l[0]
p = 2
while p < n:
    if d == 0 or l[p] - l[p-1] != d:
        print 'NO'
        break
    p += 1
else:
    print 'YES'
0