結果

問題 No.406 鴨等間隔の法則
ユーザー k0825k0825
提出日時 2019-04-28 23:45:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 18,936 KB
最終ジャッジ日時 2023-09-21 19:01:44
合計ジャッジ時間 3,225 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
12,608 KB
testcase_01 AC 16 ms
7,844 KB
testcase_02 AC 16 ms
8,088 KB
testcase_03 AC 15 ms
8,084 KB
testcase_04 AC 64 ms
17,880 KB
testcase_05 AC 32 ms
11,768 KB
testcase_06 AC 34 ms
11,872 KB
testcase_07 AC 34 ms
12,172 KB
testcase_08 AC 65 ms
18,396 KB
testcase_09 AC 70 ms
18,856 KB
testcase_10 AC 36 ms
12,628 KB
testcase_11 AC 58 ms
16,460 KB
testcase_12 AC 41 ms
13,548 KB
testcase_13 AC 40 ms
13,036 KB
testcase_14 AC 85 ms
17,208 KB
testcase_15 AC 17 ms
8,836 KB
testcase_16 AC 19 ms
9,016 KB
testcase_17 AC 17 ms
8,620 KB
testcase_18 AC 17 ms
8,892 KB
testcase_19 AC 21 ms
8,976 KB
testcase_20 AC 24 ms
9,476 KB
testcase_21 AC 21 ms
9,424 KB
testcase_22 AC 32 ms
10,400 KB
testcase_23 AC 43 ms
13,724 KB
testcase_24 AC 73 ms
15,996 KB
testcase_25 AC 71 ms
18,816 KB
testcase_26 AC 100 ms
18,824 KB
testcase_27 AC 47 ms
18,936 KB
testcase_28 AC 48 ms
18,884 KB
testcase_29 AC 101 ms
18,932 KB
testcase_30 AC 97 ms
18,844 KB
testcase_31 AC 67 ms
18,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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