結果

問題 No.406 鴨等間隔の法則
ユーザー えいじ
提出日時 2023-10-08 10:38:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,736 KB
最終ジャッジ日時 2024-07-26 18:05:13
合計ジャッジ時間 4,781 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

n = int(input())
x = sorted([int(x) for x in input().split()])
t = []
for i in range(len(x) - 1):
    t.append(x[i + 1] - x[i])
print("YES" if len(set(t)) == 1 and t[0] != 0 else "NO")
0