結果

問題 No.406 鴨等間隔の法則
ユーザー motor_radialmotor_radial
提出日時 2019-08-03 16:35:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 175 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 18,848 KB
最終ジャッジ日時 2023-09-21 19:05:36
合計ジャッジ時間 3,154 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
12,560 KB
testcase_01 AC 15 ms
7,860 KB
testcase_02 AC 15 ms
7,844 KB
testcase_03 AC 15 ms
7,956 KB
testcase_04 AC 85 ms
17,852 KB
testcase_05 AC 41 ms
11,844 KB
testcase_06 AC 42 ms
11,944 KB
testcase_07 AC 42 ms
12,036 KB
testcase_08 AC 85 ms
18,296 KB
testcase_09 AC 97 ms
18,744 KB
testcase_10 AC 46 ms
12,456 KB
testcase_11 AC 76 ms
16,456 KB
testcase_12 AC 54 ms
13,500 KB
testcase_13 AC 51 ms
12,880 KB
testcase_14 AC 80 ms
17,052 KB
testcase_15 AC 18 ms
8,840 KB
testcase_16 AC 20 ms
8,944 KB
testcase_17 AC 17 ms
8,544 KB
testcase_18 AC 20 ms
8,648 KB
testcase_19 AC 21 ms
8,924 KB
testcase_20 AC 24 ms
9,388 KB
testcase_21 AC 23 ms
9,436 KB
testcase_22 AC 31 ms
10,364 KB
testcase_23 AC 56 ms
13,660 KB
testcase_24 AC 71 ms
15,804 KB
testcase_25 AC 93 ms
18,784 KB
testcase_26 AC 93 ms
18,848 KB
testcase_27 AC 72 ms
18,800 KB
testcase_28 AC 72 ms
18,800 KB
testcase_29 AC 92 ms
18,792 KB
testcase_30 AC 92 ms
18,824 KB
testcase_31 AC 89 ms
18,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
X=sorted(list(map(int,input().split())))
d=X[1]-X[0]
cnt=0
for i in range(1,N-1):
    if d!=X[i+1]-X[i] or d==0:
        cnt=1
print("YES" if cnt==0 else "NO")
0