結果

問題 No.406 鴨等間隔の法則
ユーザー ThetaTheta
提出日時 2022-10-30 13:14:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 215 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 734 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 40,324 KB
最終ジャッジ日時 2023-09-21 11:32:02
合計ジャッジ時間 7,554 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 163 ms
34,184 KB
testcase_01 AC 135 ms
29,500 KB
testcase_02 AC 139 ms
29,540 KB
testcase_03 AC 140 ms
29,588 KB
testcase_04 AC 202 ms
39,140 KB
testcase_05 AC 157 ms
34,144 KB
testcase_06 AC 160 ms
34,140 KB
testcase_07 AC 163 ms
34,472 KB
testcase_08 AC 202 ms
39,876 KB
testcase_09 AC 208 ms
40,096 KB
testcase_10 AC 163 ms
33,820 KB
testcase_11 AC 191 ms
37,920 KB
testcase_12 AC 172 ms
34,876 KB
testcase_13 AC 166 ms
34,260 KB
testcase_14 AC 192 ms
38,440 KB
testcase_15 AC 145 ms
30,176 KB
testcase_16 AC 139 ms
30,824 KB
testcase_17 AC 139 ms
30,096 KB
testcase_18 AC 143 ms
30,676 KB
testcase_19 AC 139 ms
30,528 KB
testcase_20 AC 143 ms
30,996 KB
testcase_21 AC 142 ms
31,660 KB
testcase_22 AC 147 ms
31,688 KB
testcase_23 AC 178 ms
35,012 KB
testcase_24 AC 190 ms
37,048 KB
testcase_25 AC 212 ms
40,064 KB
testcase_26 AC 215 ms
40,116 KB
testcase_27 AC 182 ms
40,292 KB
testcase_28 AC 178 ms
39,956 KB
testcase_29 AC 202 ms
40,324 KB
testcase_30 AC 202 ms
40,188 KB
testcase_31 AC 202 ms
39,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from numpy import diff


def main():
    N = int(input())
    x = list(map(int, input().split()))
    x.sort()
    x_diff = diff(x)
    if len(set(x_diff)) == 1 and x_diff[0]:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()
0