結果

問題 No.406 鴨等間隔の法則
ユーザー ieneko18ieneko18
提出日時 2016-10-15 15:24:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2023-09-21 18:16:36
合計ジャッジ時間 2,951 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
12,564 KB
testcase_01 AC 14 ms
7,920 KB
testcase_02 AC 14 ms
8,208 KB
testcase_03 AC 14 ms
8,064 KB
testcase_04 AC 61 ms
17,960 KB
testcase_05 AC 32 ms
11,748 KB
testcase_06 AC 32 ms
11,968 KB
testcase_07 AC 32 ms
11,996 KB
testcase_08 AC 61 ms
18,432 KB
testcase_09 AC 67 ms
18,836 KB
testcase_10 AC 34 ms
12,588 KB
testcase_11 AC 54 ms
16,380 KB
testcase_12 AC 40 ms
13,444 KB
testcase_13 AC 38 ms
12,964 KB
testcase_14 AC 77 ms
17,132 KB
testcase_15 AC 17 ms
8,856 KB
testcase_16 AC 18 ms
8,828 KB
testcase_17 AC 17 ms
8,612 KB
testcase_18 AC 17 ms
9,028 KB
testcase_19 AC 20 ms
8,992 KB
testcase_20 AC 22 ms
9,484 KB
testcase_21 AC 20 ms
9,596 KB
testcase_22 AC 30 ms
10,460 KB
testcase_23 AC 42 ms
13,748 KB
testcase_24 AC 68 ms
15,884 KB
testcase_25 AC 68 ms
18,824 KB
testcase_26 AC 90 ms
18,944 KB
testcase_27 AC 48 ms
18,924 KB
testcase_28 AC 47 ms
18,884 KB
testcase_29 AC 89 ms
18,900 KB
testcase_30 AC 87 ms
18,840 KB
testcase_31 AC 64 ms
18,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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