結果

問題 No.406 鴨等間隔の法則
ユーザー titiatitia
提出日時 2023-02-26 05:01:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 10,572 KB
実行使用メモリ 18,836 KB
最終ジャッジ日時 2023-10-11 22:32:51
合計ジャッジ時間 5,019 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
12,564 KB
testcase_01 AC 15 ms
7,844 KB
testcase_02 AC 15 ms
8,148 KB
testcase_03 AC 15 ms
7,776 KB
testcase_04 AC 63 ms
17,840 KB
testcase_05 AC 32 ms
11,516 KB
testcase_06 AC 34 ms
11,892 KB
testcase_07 AC 34 ms
12,020 KB
testcase_08 AC 64 ms
18,420 KB
testcase_09 AC 69 ms
18,756 KB
testcase_10 AC 36 ms
12,232 KB
testcase_11 AC 56 ms
16,388 KB
testcase_12 AC 41 ms
13,420 KB
testcase_13 AC 39 ms
12,964 KB
testcase_14 AC 83 ms
17,084 KB
testcase_15 AC 18 ms
8,724 KB
testcase_16 AC 18 ms
8,896 KB
testcase_17 AC 17 ms
8,536 KB
testcase_18 AC 18 ms
8,960 KB
testcase_19 AC 21 ms
9,100 KB
testcase_20 AC 24 ms
9,328 KB
testcase_21 AC 21 ms
9,284 KB
testcase_22 AC 31 ms
10,368 KB
testcase_23 AC 43 ms
13,752 KB
testcase_24 AC 71 ms
15,828 KB
testcase_25 AC 69 ms
18,736 KB
testcase_26 AC 98 ms
18,836 KB
testcase_27 AC 67 ms
18,836 KB
testcase_28 AC 48 ms
18,828 KB
testcase_29 AC 99 ms
18,836 KB
testcase_30 AC 96 ms
18,712 KB
testcase_31 AC 67 ms
18,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

sa=A[1]-A[0]
for i in range(1,N):
    if A[i]-A[i-1]!=sa:
        print("NO")
        exit()

if sa==0:
    print("NO")
else:
    print("YES")
0