結果

問題 No.406 鴨等間隔の法則
ユーザー eitahoeitaho
提出日時 2016-08-07 02:58:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 18,900 KB
最終ジャッジ日時 2023-09-21 18:02:54
合計ジャッジ時間 3,378 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
13,588 KB
testcase_01 AC 15 ms
7,824 KB
testcase_02 AC 15 ms
7,732 KB
testcase_03 AC 14 ms
7,776 KB
testcase_04 AC 77 ms
17,880 KB
testcase_05 AC 37 ms
13,352 KB
testcase_06 AC 38 ms
13,420 KB
testcase_07 AC 39 ms
13,488 KB
testcase_08 AC 76 ms
18,428 KB
testcase_09 AC 84 ms
18,848 KB
testcase_10 AC 41 ms
13,576 KB
testcase_11 AC 69 ms
16,548 KB
testcase_12 AC 49 ms
13,908 KB
testcase_13 AC 46 ms
13,868 KB
testcase_14 AC 71 ms
17,116 KB
testcase_15 AC 17 ms
8,828 KB
testcase_16 AC 19 ms
9,444 KB
testcase_17 AC 17 ms
8,492 KB
testcase_18 AC 18 ms
9,628 KB
testcase_19 AC 20 ms
9,088 KB
testcase_20 AC 23 ms
9,440 KB
testcase_21 AC 23 ms
10,428 KB
testcase_22 AC 28 ms
11,052 KB
testcase_23 AC 50 ms
14,276 KB
testcase_24 AC 62 ms
15,780 KB
testcase_25 AC 83 ms
18,872 KB
testcase_26 AC 79 ms
18,764 KB
testcase_27 AC 54 ms
18,900 KB
testcase_28 AC 59 ms
18,840 KB
testcase_29 AC 79 ms
18,764 KB
testcase_30 AC 79 ms
18,772 KB
testcase_31 AC 80 ms
18,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = sorted(map(int, input().split()))
diff = [b - a for a, b in zip(A[:-1], A[1:])]
print("YES" if diff[0] > 0 and len(set(diff)) == 1 else "NO")
0