結果

問題 No.406 鴨等間隔の法則
ユーザー indiana_shima7indiana_shima7
提出日時 2016-08-08 09:48:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 10,468 KB
実行使用メモリ 18,912 KB
最終ジャッジ日時 2023-09-21 17:56:01
合計ジャッジ時間 3,624 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
12,660 KB
testcase_01 AC 14 ms
7,740 KB
testcase_02 AC 14 ms
7,816 KB
testcase_03 AC 14 ms
7,936 KB
testcase_04 AC 84 ms
17,952 KB
testcase_05 AC 38 ms
11,528 KB
testcase_06 AC 40 ms
11,808 KB
testcase_07 AC 40 ms
12,008 KB
testcase_08 AC 83 ms
18,416 KB
testcase_09 AC 89 ms
18,892 KB
testcase_10 AC 44 ms
12,164 KB
testcase_11 AC 73 ms
16,384 KB
testcase_12 AC 51 ms
13,456 KB
testcase_13 AC 48 ms
12,948 KB
testcase_14 AC 86 ms
17,192 KB
testcase_15 AC 17 ms
8,816 KB
testcase_16 AC 19 ms
8,916 KB
testcase_17 AC 16 ms
8,504 KB
testcase_18 AC 18 ms
8,868 KB
testcase_19 AC 20 ms
9,068 KB
testcase_20 AC 24 ms
9,340 KB
testcase_21 AC 22 ms
9,304 KB
testcase_22 AC 32 ms
10,536 KB
testcase_23 AC 54 ms
13,784 KB
testcase_24 AC 80 ms
15,872 KB
testcase_25 AC 91 ms
18,888 KB
testcase_26 AC 100 ms
18,768 KB
testcase_27 AC 81 ms
18,824 KB
testcase_28 AC 69 ms
18,912 KB
testcase_29 AC 101 ms
18,896 KB
testcase_30 AC 101 ms
18,736 KB
testcase_31 AC 87 ms
18,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = sorted(map(int, input().split()))

diff=A[1]-A[0]
isKamo=1
for n in range(len(A)-1):
    if diff != (A[n+1] - A[n]) or A[n+1] == A[n]:
        isKamo = 0

print("YES" if isKamo else "NO")
0