結果
問題 |
No.406 鴨等間隔の法則
|
ユーザー |
|
提出日時 | 2021-07-14 11:47:16 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 89 ms / 2,000 ms |
コード長 | 191 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 82,096 KB |
実行使用メモリ | 87,296 KB |
最終ジャッジ日時 | 2024-07-03 11:25:50 |
合計ジャッジ時間 | 3,798 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
N = int(input()) x = list(map(int, input().split())) x.sort() d = (x[-1] - x[0]) / (N - 1) t = [x[0] + d * i for i in range(N)] if x == t and d != 0: print("YES") else: print("NO")