結果

問題 No.406 鴨等間隔の法則
コンテスト
ユーザー 👑 yumechi
提出日時 2016-08-22 23:40:08
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 93 ms / 2,000 ms
+ 898µs
コード長 192 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 238 ms
コンパイル使用メモリ 96,108 KB
実行使用メモリ 109,056 KB
最終ジャッジ日時 2026-08-11 04:38:33
合計ジャッジ時間 5,747 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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