結果
| 問題 |
No.406 鴨等間隔の法則
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-22 19:46:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| コード長 | 228 bytes |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 83,200 KB |
| 最終ジャッジ日時 | 2024-11-27 20:30:16 |
| 合計ジャッジ時間 | 3,466 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
N = int(input())
lsx = list(map(int,input().split()))
lsx.sort()
d = lsx[1]-lsx[0]
if d == 0:
print('NO')
exit()
for i in range(N-1):
if d == lsx[i+1]-lsx[i]:
continue
print('NO')
exit()
print('YES')