結果

問題 No.406 鴨等間隔の法則
ユーザー oz4point5oz4point5
提出日時 2019-03-30 14:59:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 10,496 KB
実行使用メモリ 18,912 KB
最終ジャッジ日時 2023-09-21 19:01:02
合計ジャッジ時間 2,945 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
12,556 KB
testcase_01 AC 15 ms
7,752 KB
testcase_02 AC 16 ms
7,916 KB
testcase_03 AC 15 ms
7,740 KB
testcase_04 AC 62 ms
17,856 KB
testcase_05 AC 32 ms
11,504 KB
testcase_06 AC 33 ms
11,788 KB
testcase_07 AC 33 ms
11,916 KB
testcase_08 AC 65 ms
18,416 KB
testcase_09 AC 68 ms
18,788 KB
testcase_10 AC 35 ms
12,200 KB
testcase_11 AC 56 ms
16,460 KB
testcase_12 AC 41 ms
13,404 KB
testcase_13 AC 39 ms
13,000 KB
testcase_14 AC 78 ms
17,100 KB
testcase_15 AC 17 ms
8,788 KB
testcase_16 AC 18 ms
8,788 KB
testcase_17 AC 16 ms
8,572 KB
testcase_18 AC 18 ms
8,828 KB
testcase_19 AC 21 ms
8,920 KB
testcase_20 AC 24 ms
9,372 KB
testcase_21 AC 21 ms
9,256 KB
testcase_22 AC 30 ms
10,504 KB
testcase_23 AC 42 ms
13,780 KB
testcase_24 AC 69 ms
15,940 KB
testcase_25 AC 68 ms
18,872 KB
testcase_26 AC 92 ms
18,780 KB
testcase_27 AC 48 ms
18,796 KB
testcase_28 AC 47 ms
18,792 KB
testcase_29 AC 96 ms
18,912 KB
testcase_30 AC 94 ms
18,680 KB
testcase_31 AC 66 ms
18,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

n = int(input())
x = list(map(int,input().split()))

x.sort()

len = max(1,x[1] - x[0])

for i in range(n-1):
    if  x[i + 1] - x[i] != len:
        print("NO")
        break
else:
    print("YES")
0