結果

問題 No.406 鴨等間隔の法則
ユーザー akitsugu777akitsugu777
提出日時 2019-10-01 17:19:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 18,936 KB
最終ジャッジ日時 2023-09-21 19:09:06
合計ジャッジ時間 3,012 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
12,492 KB
testcase_01 AC 15 ms
7,856 KB
testcase_02 AC 15 ms
7,860 KB
testcase_03 AC 15 ms
7,832 KB
testcase_04 AC 65 ms
18,012 KB
testcase_05 AC 31 ms
11,448 KB
testcase_06 AC 32 ms
11,988 KB
testcase_07 AC 33 ms
11,904 KB
testcase_08 AC 62 ms
18,324 KB
testcase_09 AC 67 ms
18,916 KB
testcase_10 AC 36 ms
12,208 KB
testcase_11 AC 55 ms
16,544 KB
testcase_12 AC 40 ms
13,548 KB
testcase_13 AC 38 ms
13,028 KB
testcase_14 AC 94 ms
17,040 KB
testcase_15 AC 17 ms
8,692 KB
testcase_16 AC 18 ms
8,812 KB
testcase_17 AC 17 ms
8,196 KB
testcase_18 AC 17 ms
8,696 KB
testcase_19 AC 22 ms
9,076 KB
testcase_20 AC 25 ms
9,364 KB
testcase_21 AC 20 ms
9,244 KB
testcase_22 AC 36 ms
10,564 KB
testcase_23 AC 42 ms
13,672 KB
testcase_24 AC 82 ms
15,812 KB
testcase_25 AC 67 ms
18,796 KB
testcase_26 AC 107 ms
18,936 KB
testcase_27 AC 46 ms
18,792 KB
testcase_28 AC 46 ms
18,836 KB
testcase_29 AC 107 ms
18,848 KB
testcase_30 AC 105 ms
18,740 KB
testcase_31 AC 65 ms
18,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(N-1):
    if x[i+1] == x[i] or x[1] - x[0] != x[i+1] - x[i]:
        print('NO')
        break
else:
    print('YES')
0