結果

問題 No.406 鴨等間隔の法則
ユーザー brthyyjpbrthyyjp
提出日時 2021-01-11 21:24:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 450 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 105,792 KB
最終ジャッジ日時 2023-08-13 13:43:20
合計ジャッジ時間 5,973 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
85,788 KB
testcase_01 AC 74 ms
71,244 KB
testcase_02 AC 76 ms
71,244 KB
testcase_03 AC 75 ms
71,144 KB
testcase_04 AC 106 ms
101,392 KB
testcase_05 AC 87 ms
82,788 KB
testcase_06 AC 89 ms
82,784 KB
testcase_07 AC 87 ms
84,004 KB
testcase_08 AC 105 ms
101,204 KB
testcase_09 AC 108 ms
104,400 KB
testcase_10 AC 87 ms
85,812 KB
testcase_11 AC 100 ms
97,740 KB
testcase_12 AC 88 ms
88,540 KB
testcase_13 AC 89 ms
88,580 KB
testcase_14 AC 116 ms
101,784 KB
testcase_15 AC 78 ms
75,484 KB
testcase_16 AC 77 ms
75,488 KB
testcase_17 AC 75 ms
75,664 KB
testcase_18 AC 77 ms
75,372 KB
testcase_19 AC 77 ms
76,060 KB
testcase_20 AC 81 ms
76,668 KB
testcase_21 AC 78 ms
76,064 KB
testcase_22 AC 84 ms
79,252 KB
testcase_23 AC 91 ms
90,352 KB
testcase_24 AC 114 ms
98,456 KB
testcase_25 AC 108 ms
104,540 KB
testcase_26 AC 123 ms
105,524 KB
testcase_27 AC 94 ms
90,132 KB
testcase_28 AC 110 ms
104,860 KB
testcase_29 AC 126 ms
105,792 KB
testcase_30 AC 126 ms
105,592 KB
testcase_31 AC 112 ms
104,496 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