結果
問題 |
No.406 鴨等間隔の法則
|
ユーザー |
![]() |
提出日時 | 2021-02-10 00:10:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 84 ms / 2,000 ms |
コード長 | 169 bytes |
コンパイル時間 | 821 ms |
コンパイル使用メモリ | 81,892 KB |
実行使用メモリ | 85,376 KB |
最終ジャッジ日時 | 2024-07-07 05:36:01 |
合計ジャッジ時間 | 3,808 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
n = int(input()) a = sorted(map(int,input().split())) ok = any(ai != a[0] for ai in a) and all(a[i+1]-a[i] == a[1]-a[0] for i in range(n-1)) print("YES" if ok else "NO")