結果
問題 |
No.406 鴨等間隔の法則
|
ユーザー |
|
提出日時 | 2021-12-03 19:38:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 253 bytes |
コンパイル時間 | 195 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 23,860 KB |
最終ジャッジ日時 | 2024-07-06 01:58:13 |
合計ジャッジ時間 | 4,155 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
n=int(input()) l=[int(x) for x in input().split()] nl=list(set(l)) c="YES" if len(nl)==len(l): nl.sort() a=(nl[-1]-nl[0])/(n-1) for i in range(n-1): if nl[i+1]-nl[i]!=a: c="NO" break else: c="NO" print(c)