結果

問題 No.406 鴨等間隔の法則
ユーザー hanorverhanorver
提出日時 2016-09-12 22:12:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 126 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 18,912 KB
最終ジャッジ日時 2023-09-21 18:12:06
合計ジャッジ時間 3,183 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
13,080 KB
testcase_01 AC 15 ms
7,844 KB
testcase_02 AC 16 ms
7,848 KB
testcase_03 AC 14 ms
7,796 KB
testcase_04 AC 73 ms
17,976 KB
testcase_05 AC 36 ms
12,184 KB
testcase_06 AC 36 ms
12,368 KB
testcase_07 AC 37 ms
12,452 KB
testcase_08 AC 73 ms
18,332 KB
testcase_09 AC 78 ms
18,864 KB
testcase_10 AC 40 ms
13,000 KB
testcase_11 AC 64 ms
16,412 KB
testcase_12 AC 47 ms
13,492 KB
testcase_13 AC 43 ms
13,016 KB
testcase_14 AC 66 ms
17,000 KB
testcase_15 AC 17 ms
8,832 KB
testcase_16 AC 19 ms
9,464 KB
testcase_17 AC 16 ms
8,448 KB
testcase_18 AC 18 ms
9,500 KB
testcase_19 AC 19 ms
9,060 KB
testcase_20 AC 21 ms
9,404 KB
testcase_21 AC 24 ms
10,096 KB
testcase_22 AC 27 ms
10,384 KB
testcase_23 AC 49 ms
13,756 KB
testcase_24 AC 58 ms
15,872 KB
testcase_25 AC 77 ms
18,912 KB
testcase_26 AC 76 ms
18,744 KB
testcase_27 AC 54 ms
18,860 KB
testcase_28 AC 55 ms
18,728 KB
testcase_29 AC 75 ms
18,812 KB
testcase_30 AC 73 ms
18,740 KB
testcase_31 AC 75 ms
18,524 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:4: SyntaxWarning: invalid decimal literal
  print("NO"if len(l)>1 or 0in l else"YES")

ソースコード

diff #

input()
a=sorted(map(int,input().split()))
l={a[i+1]-a[i] for i in range(len(a)-1)}
print("NO"if len(l)>1 or 0in l else"YES")
0