結果

問題 No.406 鴨等間隔の法則
ユーザー 👑 yumechiyumechi
提出日時 2016-08-22 23:40:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 1,053 ms
コンパイル使用メモリ 86,676 KB
実行使用メモリ 101,536 KB
最終ジャッジ日時 2023-09-21 18:03:32
合計ジャッジ時間 5,570 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
84,456 KB
testcase_01 AC 69 ms
71,256 KB
testcase_02 AC 71 ms
71,228 KB
testcase_03 AC 72 ms
71,216 KB
testcase_04 AC 112 ms
97,840 KB
testcase_05 AC 85 ms
82,104 KB
testcase_06 AC 87 ms
82,316 KB
testcase_07 AC 87 ms
83,216 KB
testcase_08 AC 112 ms
97,780 KB
testcase_09 AC 116 ms
100,584 KB
testcase_10 AC 90 ms
84,708 KB
testcase_11 AC 108 ms
95,236 KB
testcase_12 AC 94 ms
87,184 KB
testcase_13 AC 93 ms
87,024 KB
testcase_14 AC 112 ms
98,168 KB
testcase_15 AC 73 ms
75,660 KB
testcase_16 AC 76 ms
75,628 KB
testcase_17 AC 74 ms
75,660 KB
testcase_18 AC 76 ms
75,624 KB
testcase_19 AC 76 ms
75,640 KB
testcase_20 AC 76 ms
76,528 KB
testcase_21 AC 77 ms
76,568 KB
testcase_22 AC 82 ms
79,052 KB
testcase_23 AC 97 ms
88,640 KB
testcase_24 AC 105 ms
95,024 KB
testcase_25 AC 119 ms
100,368 KB
testcase_26 AC 118 ms
101,536 KB
testcase_27 AC 88 ms
85,608 KB
testcase_28 AC 103 ms
100,840 KB
testcase_29 AC 119 ms
101,508 KB
testcase_30 AC 118 ms
101,336 KB
testcase_31 AC 116 ms
100,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xl = sorted([int(i) for i in input().split()])
if len(set(xl)) != n:
    print("NO")
    exit(0)
print("YES" if len(set([xl[i] - xl[i+1] for i in range(n-1)])) == 1 else "NO")
0