結果

問題 No.406 鴨等間隔の法則
ユーザー indiana_shima7indiana_shima7
提出日時 2016-08-08 09:45:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 209 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,732 KB
最終ジャッジ日時 2024-04-24 20:12:17
合計ジャッジ時間 4,055 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
15,404 KB
testcase_01 AC 30 ms
10,624 KB
testcase_02 AC 30 ms
10,624 KB
testcase_03 WA -
testcase_04 AC 125 ms
20,444 KB
testcase_05 AC 62 ms
14,336 KB
testcase_06 AC 64 ms
14,468 KB
testcase_07 AC 65 ms
14,520 KB
testcase_08 AC 125 ms
20,892 KB
testcase_09 AC 137 ms
21,292 KB
testcase_10 AC 71 ms
15,056 KB
testcase_11 AC 110 ms
19,064 KB
testcase_12 AC 82 ms
15,992 KB
testcase_13 AC 76 ms
15,744 KB
testcase_14 AC 101 ms
19,760 KB
testcase_15 WA -
testcase_16 AC 35 ms
11,520 KB
testcase_17 AC 33 ms
11,008 KB
testcase_18 AC 37 ms
11,520 KB
testcase_19 AC 36 ms
11,520 KB
testcase_20 AC 39 ms
11,904 KB
testcase_21 AC 40 ms
12,032 KB
testcase_22 AC 47 ms
13,072 KB
testcase_23 AC 84 ms
16,500 KB
testcase_24 AC 92 ms
18,600 KB
testcase_25 AC 133 ms
21,484 KB
testcase_26 AC 115 ms
21,600 KB
testcase_27 WA -
testcase_28 AC 107 ms
21,552 KB
testcase_29 AC 115 ms
21,728 KB
testcase_30 AC 114 ms
21,524 KB
testcase_31 AC 132 ms
21,036 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]) and A[n+1] != A[n]:
        isKamo = 0

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