結果

問題 No.406 鴨等間隔の法則
ユーザー NagisaNagisa
提出日時 2016-08-22 21:45:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 18,988 KB
最終ジャッジ日時 2023-09-21 18:06:30
合計ジャッジ時間 3,182 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
12,476 KB
testcase_01 AC 15 ms
7,816 KB
testcase_02 AC 15 ms
8,036 KB
testcase_03 AC 15 ms
8,148 KB
testcase_04 AC 64 ms
17,840 KB
testcase_05 AC 32 ms
11,800 KB
testcase_06 AC 37 ms
11,828 KB
testcase_07 AC 34 ms
12,024 KB
testcase_08 AC 64 ms
18,340 KB
testcase_09 AC 69 ms
18,740 KB
testcase_10 AC 35 ms
12,568 KB
testcase_11 AC 57 ms
16,436 KB
testcase_12 AC 41 ms
13,588 KB
testcase_13 AC 40 ms
12,980 KB
testcase_14 AC 94 ms
17,128 KB
testcase_15 AC 17 ms
8,708 KB
testcase_16 AC 18 ms
8,956 KB
testcase_17 AC 17 ms
8,488 KB
testcase_18 AC 18 ms
9,028 KB
testcase_19 AC 22 ms
9,008 KB
testcase_20 AC 25 ms
9,544 KB
testcase_21 AC 21 ms
9,640 KB
testcase_22 AC 34 ms
10,492 KB
testcase_23 AC 43 ms
13,788 KB
testcase_24 AC 83 ms
15,848 KB
testcase_25 AC 69 ms
18,792 KB
testcase_26 AC 109 ms
18,792 KB
testcase_27 AC 47 ms
18,920 KB
testcase_28 AC 48 ms
18,836 KB
testcase_29 AC 111 ms
18,988 KB
testcase_30 AC 110 ms
18,676 KB
testcase_31 AC 66 ms
18,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

d = x[1] - x[0]
for k in range(1,N):
    if x[k] - x[k-1] != d or x[k] == x[k-1]:
        print("NO")
        exit()

print("YES")
0