結果

問題 No.406 鴨等間隔の法則
ユーザー akasatanananaakasatananana
提出日時 2019-09-18 23:44:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 18,988 KB
最終ジャッジ日時 2023-09-24 22:42:47
合計ジャッジ時間 3,148 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
12,620 KB
testcase_01 AC 16 ms
7,936 KB
testcase_02 AC 17 ms
7,876 KB
testcase_03 WA -
testcase_04 AC 69 ms
17,900 KB
testcase_05 AC 34 ms
11,608 KB
testcase_06 AC 36 ms
12,060 KB
testcase_07 AC 37 ms
12,068 KB
testcase_08 AC 72 ms
18,548 KB
testcase_09 AC 73 ms
18,872 KB
testcase_10 AC 38 ms
12,304 KB
testcase_11 AC 60 ms
16,512 KB
testcase_12 AC 44 ms
13,564 KB
testcase_13 AC 42 ms
12,964 KB
testcase_14 AC 96 ms
17,244 KB
testcase_15 WA -
testcase_16 AC 19 ms
8,900 KB
testcase_17 AC 18 ms
8,628 KB
testcase_18 AC 19 ms
8,792 KB
testcase_19 AC 22 ms
9,124 KB
testcase_20 AC 25 ms
9,448 KB
testcase_21 AC 23 ms
9,512 KB
testcase_22 AC 34 ms
10,440 KB
testcase_23 AC 46 ms
13,804 KB
testcase_24 AC 82 ms
15,972 KB
testcase_25 AC 75 ms
18,904 KB
testcase_26 AC 111 ms
18,988 KB
testcase_27 WA -
testcase_28 AC 52 ms
18,816 KB
testcase_29 AC 110 ms
18,936 KB
testcase_30 AC 108 ms
18,736 KB
testcase_31 AC 72 ms
18,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a=int(input())
b=[int(i) for i in input().split()]
b.sort()
c=b[1]-b[0]
if b.count(b[0])>=2:
    print("NO")
for i in range(1,a):
    if i>=2:
        d=b[i]-b[i-1]
        if c!=d:
            print("NO")
            break
else:
    print("YES")
0