結果

問題 No.406 鴨等間隔の法則
ユーザー tarotaro789tarotaro789
提出日時 2017-04-05 10:18:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 19,116 KB
最終ジャッジ日時 2023-09-21 18:25:10
合計ジャッジ時間 3,619 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
12,512 KB
testcase_01 AC 15 ms
7,760 KB
testcase_02 AC 14 ms
7,760 KB
testcase_03 AC 15 ms
7,852 KB
testcase_04 AC 113 ms
18,012 KB
testcase_05 AC 50 ms
11,456 KB
testcase_06 AC 51 ms
11,944 KB
testcase_07 AC 51 ms
12,072 KB
testcase_08 AC 113 ms
18,316 KB
testcase_09 AC 119 ms
18,828 KB
testcase_10 AC 55 ms
12,332 KB
testcase_11 AC 94 ms
16,436 KB
testcase_12 AC 67 ms
13,540 KB
testcase_13 AC 64 ms
13,000 KB
testcase_14 AC 99 ms
17,216 KB
testcase_15 AC 20 ms
8,784 KB
testcase_16 AC 21 ms
8,892 KB
testcase_17 AC 18 ms
8,608 KB
testcase_18 AC 21 ms
8,764 KB
testcase_19 AC 23 ms
9,120 KB
testcase_20 AC 26 ms
9,348 KB
testcase_21 AC 26 ms
9,256 KB
testcase_22 AC 37 ms
10,560 KB
testcase_23 AC 69 ms
13,708 KB
testcase_24 AC 86 ms
15,864 KB
testcase_25 AC 123 ms
18,828 KB
testcase_26 AC 116 ms
19,056 KB
testcase_27 AC 95 ms
19,116 KB
testcase_28 AC 97 ms
18,796 KB
testcase_29 AC 113 ms
19,064 KB
testcase_30 AC 113 ms
18,904 KB
testcase_31 AC 117 ms
18,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
lsx=list(map(int,input().split()))
lsx.sort()
flg=0
for i in range(1,len(lsx)-1):
    s1=lsx[i]-lsx[i-1]
    s2=lsx[i+1]-lsx[i]
    if s1!=s2 or s1==0:
        flg=1
if flg==1:
    print("NO")
else:
    print("YES")
    
0