結果

問題 No.406 鴨等間隔の法則
ユーザー r_yo6021
提出日時 2016-09-05 23:10:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 224 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,608 KB
最終ジャッジ日時 2024-11-07 05:41:59
合計ジャッジ時間 3,147 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 2
other AC * 2 RE * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = sorted(list(map(int, input().split())))

d = L[1] - L[0]
if d == 0:
    print("NO")
    exit()

for i in range(2, N):
    if L[i] - [i - 1] == d:
        print("NO")
        break
else:
    print("YES")
0