結果

問題 No.406 鴨等間隔の法則
ユーザー DexctersuDexctersu
提出日時 2017-07-09 21:50:40
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 409 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 18,892 KB
最終ジャッジ日時 2023-09-21 18:31:56
合計ジャッジ時間 3,011 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
12,496 KB
testcase_01 AC 14 ms
7,800 KB
testcase_02 AC 14 ms
8,200 KB
testcase_03 AC 14 ms
8,248 KB
testcase_04 AC 63 ms
17,892 KB
testcase_05 AC 33 ms
11,660 KB
testcase_06 AC 33 ms
11,932 KB
testcase_07 AC 33 ms
12,052 KB
testcase_08 AC 65 ms
18,512 KB
testcase_09 AC 65 ms
18,760 KB
testcase_10 AC 35 ms
12,280 KB
testcase_11 AC 53 ms
16,492 KB
testcase_12 AC 39 ms
13,440 KB
testcase_13 AC 38 ms
13,040 KB
testcase_14 AC 93 ms
17,200 KB
testcase_15 AC 16 ms
8,876 KB
testcase_16 AC 18 ms
8,820 KB
testcase_17 AC 17 ms
8,516 KB
testcase_18 AC 17 ms
8,904 KB
testcase_19 AC 22 ms
9,120 KB
testcase_20 AC 26 ms
9,524 KB
testcase_21 AC 20 ms
9,416 KB
testcase_22 AC 35 ms
10,376 KB
testcase_23 AC 42 ms
13,676 KB
testcase_24 AC 86 ms
15,908 KB
testcase_25 AC 66 ms
18,828 KB
testcase_26 AC 108 ms
18,876 KB
testcase_27 AC 46 ms
18,812 KB
testcase_28 AC 46 ms
18,892 KB
testcase_29 AC 107 ms
18,808 KB
testcase_30 AC 108 ms
18,692 KB
testcase_31 AC 65 ms
18,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
x=sorted(map(int,input().split()))
for i in range(n-1):
    if x[i]==x[i+1] or x[1]-x[0]!=x[i+1]-x[i]:
        print("NO")
        exit()
print("YES")
0