結果

問題 No.406 鴨等間隔の法則
ユーザー brthyyjpbrthyyjp
提出日時 2021-01-11 21:24:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 686 ms
コンパイル使用メモリ 82,536 KB
実行使用メモリ 99,072 KB
最終ジャッジ日時 2024-11-21 09:24:42
合計ジャッジ時間 4,450 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
74,112 KB
testcase_01 AC 42 ms
51,712 KB
testcase_02 AC 42 ms
52,096 KB
testcase_03 AC 42 ms
51,712 KB
testcase_04 AC 88 ms
92,544 KB
testcase_05 AC 61 ms
70,656 KB
testcase_06 AC 61 ms
71,040 KB
testcase_07 AC 61 ms
72,192 KB
testcase_08 AC 83 ms
92,544 KB
testcase_09 AC 89 ms
96,256 KB
testcase_10 AC 63 ms
73,856 KB
testcase_11 AC 79 ms
88,576 KB
testcase_12 AC 72 ms
77,312 KB
testcase_13 AC 70 ms
76,928 KB
testcase_14 AC 99 ms
93,696 KB
testcase_15 AC 51 ms
59,136 KB
testcase_16 AC 51 ms
59,904 KB
testcase_17 AC 49 ms
59,136 KB
testcase_18 AC 49 ms
59,904 KB
testcase_19 AC 52 ms
61,568 KB
testcase_20 AC 53 ms
62,848 KB
testcase_21 AC 53 ms
62,592 KB
testcase_22 AC 60 ms
67,328 KB
testcase_23 AC 71 ms
79,104 KB
testcase_24 AC 89 ms
89,728 KB
testcase_25 AC 87 ms
97,024 KB
testcase_26 AC 106 ms
99,072 KB
testcase_27 AC 70 ms
81,024 KB
testcase_28 AC 87 ms
96,640 KB
testcase_29 AC 105 ms
98,432 KB
testcase_30 AC 104 ms
98,432 KB
testcase_31 AC 89 ms
95,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
X = list(map(int, input().split()))

if len(X) != len(set(X)):
    print('NO')
    exit()

X.sort()
d = X[1]-X[0]
for i in range(n-1):
    if X[i]+d != X[i+1]:
        print('NO')
        exit()
else:
    print('YES')
0