結果
| 問題 |
No.406 鴨等間隔の法則
|
| コンテスト | |
| ユーザー |
はむ吉🐹
|
| 提出日時 | 2018-07-18 18:49:32 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 110 ms / 2,000 ms |
| コード長 | 272 bytes |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,532 KB |
| 最終ジャッジ日時 | 2024-07-07 12:28:35 |
| 合計ジャッジ時間 | 3,512 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
#!/usr/bin/env python3
def main():
_ = int(input())
xs = sorted(int(x) for x in input().split())
ds = [xj - xi for xi, xj in zip(xs[:-1], xs[1:])]
print("YES" if ds[0] > 0 and all(d == ds[0] for d in ds) else "NO")
if __name__ == "__main__":
main()
はむ吉🐹