結果

問題 No.406 鴨等間隔の法則
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-10 13:32:24
言語 Python2
(2.7.18)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 687 ms
コンパイル使用メモリ 6,672 KB
実行使用メモリ 14,512 KB
最終ジャッジ日時 2023-09-21 19:03:09
合計ジャッジ時間 4,083 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
9,424 KB
testcase_01 AC 12 ms
5,940 KB
testcase_02 AC 11 ms
5,864 KB
testcase_03 AC 11 ms
5,860 KB
testcase_04 AC 96 ms
13,584 KB
testcase_05 AC 40 ms
8,744 KB
testcase_06 AC 42 ms
8,928 KB
testcase_07 AC 43 ms
8,824 KB
testcase_08 AC 94 ms
13,660 KB
testcase_09 AC 105 ms
14,388 KB
testcase_10 AC 47 ms
9,252 KB
testcase_11 AC 82 ms
12,380 KB
testcase_12 AC 56 ms
10,004 KB
testcase_13 AC 52 ms
9,876 KB
testcase_14 AC 105 ms
12,940 KB
testcase_15 AC 14 ms
6,188 KB
testcase_16 AC 16 ms
6,496 KB
testcase_17 AC 14 ms
6,212 KB
testcase_18 AC 15 ms
6,428 KB
testcase_19 AC 19 ms
6,444 KB
testcase_20 AC 23 ms
6,748 KB
testcase_21 AC 21 ms
6,712 KB
testcase_22 AC 34 ms
7,676 KB
testcase_23 AC 59 ms
10,272 KB
testcase_24 AC 94 ms
12,192 KB
testcase_25 AC 105 ms
14,436 KB
testcase_26 AC 130 ms
14,512 KB
testcase_27 AC 61 ms
14,428 KB
testcase_28 AC 66 ms
14,508 KB
testcase_29 AC 129 ms
14,504 KB
testcase_30 AC 129 ms
14,256 KB
testcase_31 AC 100 ms
13,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
duck = map(int, raw_input().split())
duck.sort()
tmp = duck[1]-duck[0]
ans = 'NO'
if tmp != 0:
	for i in range(1, N-1):
		if duck[i+1]-duck[i] != tmp: break
		if i == N-2: ans = 'YES'
print ans
0