結果
問題 |
No.406 鴨等間隔の法則
|
ユーザー |
![]() |
提出日時 | 2016-10-08 04:32:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 91 ms / 2,000 ms |
コード長 | 347 bytes |
コンパイル時間 | 123 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 22,392 KB |
最終ジャッジ日時 | 2024-07-07 11:50:40 |
合計ジャッジ時間 | 2,906 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
def readint(): return int(input()) def readints(): return list(map(int, input().split())) def calc(xs): ys = sorted(xs) s = set([a - b for a, b in zip(ys, ys[1:])]) return len(s) == 1 and 0 not in s def main(): readint() xs = readints() print("YES" if calc(xs) else "NO") if __name__ == "__main__": main()