結果

問題 No.406 鴨等間隔の法則
ユーザー superzugansuperzugan
提出日時 2021-08-17 22:09:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 23,608 KB
最終ジャッジ日時 2024-04-19 05:39:28
合計ジャッジ時間 3,302 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
16,740 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 29 ms
10,496 KB
testcase_03 AC 27 ms
10,496 KB
testcase_04 AC 85 ms
22,392 KB
testcase_05 AC 44 ms
16,636 KB
testcase_06 AC 46 ms
15,872 KB
testcase_07 AC 50 ms
17,204 KB
testcase_08 AC 91 ms
22,912 KB
testcase_09 AC 100 ms
23,444 KB
testcase_10 AC 49 ms
16,520 KB
testcase_11 AC 73 ms
18,940 KB
testcase_12 AC 58 ms
17,588 KB
testcase_13 AC 54 ms
16,440 KB
testcase_14 AC 97 ms
22,528 KB
testcase_15 AC 27 ms
11,136 KB
testcase_16 AC 32 ms
11,904 KB
testcase_17 AC 27 ms
11,008 KB
testcase_18 AC 31 ms
12,032 KB
testcase_19 AC 36 ms
12,160 KB
testcase_20 AC 36 ms
12,544 KB
testcase_21 AC 35 ms
12,416 KB
testcase_22 AC 46 ms
15,368 KB
testcase_23 AC 57 ms
17,856 KB
testcase_24 AC 91 ms
18,548 KB
testcase_25 AC 94 ms
23,544 KB
testcase_26 AC 108 ms
22,668 KB
testcase_27 AC 62 ms
21,480 KB
testcase_28 AC 70 ms
23,548 KB
testcase_29 AC 116 ms
23,048 KB
testcase_30 AC 123 ms
23,608 KB
testcase_31 AC 88 ms
23,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
lst=sorted(map(int,input().split()))
tmp=lst[1]-lst[0]
if len(set(lst))!=n:print("NO");exit()
for i in range(1,n-1):
    if tmp!=lst[i+1]-lst[i]:print("NO");exit()
print("YES")
0