結果
問題 |
No.406 鴨等間隔の法則
|
ユーザー |
![]() |
提出日時 | 2020-03-30 17:36:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 118 ms / 2,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 119 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,616 KB |
最終ジャッジ日時 | 2024-07-07 13:05:59 |
合計ジャッジ時間 | 3,447 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n=int(input()) X=sorted([int(i) for i in input().split()]) d=X[1]-X[0] if d==0: print("NO") else: for i in range(n-2): if d==X[i+2]-X[i+1]: continue else: print("NO") break else: print("YES")