結果

問題 No.406 鴨等間隔の法則
ユーザー ebicochinealebicochineal
提出日時 2017-01-25 10:06:41
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 119 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 18,956 KB
最終ジャッジ日時 2023-09-21 18:21:02
合計ジャッジ時間 2,928 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
12,892 KB
testcase_01 AC 15 ms
7,812 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 15 ms
7,844 KB
testcase_04 AC 73 ms
17,968 KB
testcase_05 AC 36 ms
12,692 KB
testcase_06 AC 35 ms
12,784 KB
testcase_07 AC 36 ms
12,744 KB
testcase_08 AC 73 ms
18,456 KB
testcase_09 AC 75 ms
18,744 KB
testcase_10 AC 38 ms
12,800 KB
testcase_11 AC 60 ms
16,464 KB
testcase_12 AC 44 ms
13,484 KB
testcase_13 AC 41 ms
13,092 KB
testcase_14 AC 66 ms
17,104 KB
testcase_15 AC 18 ms
8,584 KB
testcase_16 AC 18 ms
8,876 KB
testcase_17 AC 16 ms
8,320 KB
testcase_18 AC 17 ms
8,764 KB
testcase_19 AC 19 ms
9,148 KB
testcase_20 AC 21 ms
9,508 KB
testcase_21 AC 22 ms
9,908 KB
testcase_22 AC 28 ms
10,840 KB
testcase_23 AC 45 ms
13,808 KB
testcase_24 AC 59 ms
15,920 KB
testcase_25 AC 76 ms
18,896 KB
testcase_26 AC 78 ms
18,796 KB
testcase_27 AC 53 ms
18,792 KB
testcase_28 AC 55 ms
18,856 KB
testcase_29 AC 77 ms
18,956 KB
testcase_30 AC 77 ms
18,860 KB
testcase_31 AC 73 ms
18,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
A=sorted(map(int,input().split()));d=A[1]-A[0]
print(['NO','YES'][[x*d+A[0]for x in range(n)]*(d>0)==A])
0