結果

問題 No.406 鴨等間隔の法則
ユーザー tktk_snsntktk_snsn
提出日時 2021-02-16 00:06:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 113,348 KB
最終ジャッジ日時 2023-09-30 21:52:51
合計ジャッジ時間 5,626 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
85,820 KB
testcase_01 AC 77 ms
71,276 KB
testcase_02 AC 73 ms
71,280 KB
testcase_03 AC 73 ms
71,156 KB
testcase_04 AC 107 ms
101,304 KB
testcase_05 AC 86 ms
83,048 KB
testcase_06 AC 86 ms
83,120 KB
testcase_07 AC 87 ms
84,648 KB
testcase_08 AC 107 ms
101,244 KB
testcase_09 AC 109 ms
104,660 KB
testcase_10 AC 89 ms
85,892 KB
testcase_11 AC 99 ms
98,048 KB
testcase_12 AC 92 ms
88,708 KB
testcase_13 AC 91 ms
88,624 KB
testcase_14 AC 125 ms
108,348 KB
testcase_15 AC 75 ms
75,656 KB
testcase_16 AC 79 ms
75,940 KB
testcase_17 AC 77 ms
75,988 KB
testcase_18 AC 78 ms
75,996 KB
testcase_19 AC 79 ms
75,988 KB
testcase_20 AC 82 ms
76,584 KB
testcase_21 AC 84 ms
76,780 KB
testcase_22 AC 86 ms
80,264 KB
testcase_23 AC 94 ms
90,684 KB
testcase_24 AC 119 ms
104,428 KB
testcase_25 AC 108 ms
104,672 KB
testcase_26 AC 130 ms
113,316 KB
testcase_27 AC 93 ms
90,392 KB
testcase_28 AC 108 ms
104,688 KB
testcase_29 AC 134 ms
113,348 KB
testcase_30 AC 137 ms
113,104 KB
testcase_31 AC 108 ms
104,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int,input().split()))

if len(set(A))!=len(A):
    print("NO")
    exit()

A.sort()
d = [b-a for a,b in zip(A[:-1],A[1:])]
if len(set(d))==1:
    print("YES")
else:
    print("NO")
0