結果
問題 |
No.406 鴨等間隔の法則
|
ユーザー |
![]() |
提出日時 | 2018-02-22 02:30:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 396 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 28,920 KB |
最終ジャッジ日時 | 2024-09-21 22:13:04 |
合計ジャッジ時間 | 7,314 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 28 |
ソースコード
n = int(input()) kamo = sorted([int(i) for i in input().split()], reverse=True) isDuplicate = False distance_list = [] for i in range(len(kamo) - 1): if kamo.count(kamo[i]) != 1: isDuplicate = True distance = 0 distance = kamo[i] - kamo[i + 1] distance_list.append(distance) if not isDuplicate and (len(set(distance_list)) == 1): print("YES") else: print("NO")