結果

問題 No.406 鴨等間隔の法則
ユーザー 310icecrystal310icecrystal
提出日時 2023-06-10 20:51:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 177 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,372 KB
実行使用メモリ 91,368 KB
最終ジャッジ日時 2023-08-31 00:51:35
合計ジャッジ時間 4,837 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
80,884 KB
testcase_01 AC 78 ms
71,096 KB
testcase_02 AC 71 ms
70,908 KB
testcase_03 AC 71 ms
70,956 KB
testcase_04 AC 108 ms
88,972 KB
testcase_05 AC 87 ms
79,444 KB
testcase_06 AC 87 ms
80,080 KB
testcase_07 AC 89 ms
80,256 KB
testcase_08 AC 110 ms
88,844 KB
testcase_09 AC 113 ms
90,852 KB
testcase_10 AC 90 ms
80,996 KB
testcase_11 AC 102 ms
87,260 KB
testcase_12 AC 92 ms
82,176 KB
testcase_13 AC 94 ms
81,828 KB
testcase_14 AC 107 ms
89,156 KB
testcase_15 AC 77 ms
75,552 KB
testcase_16 AC 77 ms
75,844 KB
testcase_17 AC 75 ms
75,552 KB
testcase_18 AC 77 ms
75,872 KB
testcase_19 AC 80 ms
76,180 KB
testcase_20 AC 80 ms
75,848 KB
testcase_21 AC 80 ms
76,124 KB
testcase_22 AC 82 ms
77,076 KB
testcase_23 AC 96 ms
82,824 KB
testcase_24 AC 105 ms
86,944 KB
testcase_25 AC 115 ms
90,888 KB
testcase_26 AC 112 ms
91,084 KB
testcase_27 AC 95 ms
90,496 KB
testcase_28 AC 96 ms
91,132 KB
testcase_29 AC 111 ms
91,016 KB
testcase_30 AC 110 ms
91,368 KB
testcase_31 AC 110 ms
91,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x = list(map(int,input().split()))
x.sort()

S = set()
for i in range(N-1):
	S.add(x[i+1]-x[i])

if len(S) == 1 and 0 not in S:
	print("YES")
else:
	print("NO")
0