結果

問題 No.406 鴨等間隔の法則
ユーザー yohei-kuyohei-ku
提出日時 2018-03-28 00:19:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 415 ms
コンパイル使用メモリ 6,632 KB
実行使用メモリ 26,404 KB
最終ジャッジ日時 2023-09-21 18:46:41
合計ジャッジ時間 4,476 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
13,188 KB
testcase_01 AC 11 ms
6,004 KB
testcase_02 AC 11 ms
6,040 KB
testcase_03 AC 10 ms
5,980 KB
testcase_04 AC 146 ms
20,812 KB
testcase_05 AC 58 ms
11,792 KB
testcase_06 AC 60 ms
12,232 KB
testcase_07 AC 62 ms
12,708 KB
testcase_08 AC 145 ms
20,688 KB
testcase_09 AC 156 ms
22,536 KB
testcase_10 AC 68 ms
13,240 KB
testcase_11 AC 121 ms
18,596 KB
testcase_12 AC 81 ms
14,640 KB
testcase_13 AC 76 ms
14,464 KB
testcase_14 AC 134 ms
22,448 KB
testcase_15 AC 16 ms
6,608 KB
testcase_16 AC 20 ms
7,588 KB
testcase_17 AC 15 ms
6,636 KB
testcase_18 AC 19 ms
7,824 KB
testcase_19 AC 22 ms
8,028 KB
testcase_20 AC 27 ms
8,548 KB
testcase_21 AC 27 ms
8,620 KB
testcase_22 AC 43 ms
12,068 KB
testcase_23 AC 86 ms
15,300 KB
testcase_24 AC 116 ms
18,800 KB
testcase_25 AC 156 ms
22,640 KB
testcase_26 AC 162 ms
26,260 KB
testcase_27 AC 113 ms
20,016 KB
testcase_28 AC 116 ms
22,456 KB
testcase_29 AC 158 ms
26,404 KB
testcase_30 AC 158 ms
26,084 KB
testcase_31 AC 150 ms
22,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
List = []
w = raw_input()
w_split = w.split()
for i in range(0,N):
    List.append(int(w_split[i]))
List.sort()

A = List
B = A[:]
LL =[]
for i in range(0,N-1):
    LL.append(abs(B[i]-A[i+1]))
if len(set(LL)) == 1 and len(List) == len(set(List)):
    print 'YES'
else:
    print 'NO'
0