結果
| 問題 |
No.406 鴨等間隔の法則
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-26 21:58:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 118 ms / 2,000 ms |
| コード長 | 327 bytes |
| コンパイル時間 | 105 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 23,720 KB |
| 最終ジャッジ日時 | 2024-07-07 12:37:53 |
| 合計ジャッジ時間 | 3,183 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
import sys
def parse(n):
return int(n)
n=int(input())
l=list(map(parse, input().split(" ")))
l.sort()
if len(set(l)) != len(l):
print("NO")
sys.exit()
l2=[]
for i in range(0, len(l) - 1):
l2.append(l[i + 1] - l[i])
length=len(l2)
t=l2[0]
if sum(l2) == t * length:
print("YES")
else:
print("NO")