結果

問題 No.406 鴨等間隔の法則
ユーザー yohei-ku
提出日時 2018-03-28 00:19:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 524 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 26,760 KB
最終ジャッジ日時 2024-07-07 12:22:31
合計ジャッジ時間 3,932 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

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