結果

問題 No.406 鴨等間隔の法則
ユーザー deepjugglingdeepjuggling
提出日時 2023-01-27 18:26:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 1,462 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 91,660 KB
最終ジャッジ日時 2023-09-10 12:24:43
合計ジャッジ時間 5,812 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
80,680 KB
testcase_01 AC 75 ms
71,264 KB
testcase_02 AC 73 ms
71,400 KB
testcase_03 AC 72 ms
71,492 KB
testcase_04 AC 105 ms
89,148 KB
testcase_05 AC 85 ms
79,072 KB
testcase_06 AC 86 ms
79,148 KB
testcase_07 AC 88 ms
79,848 KB
testcase_08 AC 106 ms
88,856 KB
testcase_09 AC 110 ms
90,864 KB
testcase_10 AC 89 ms
80,764 KB
testcase_11 AC 101 ms
87,008 KB
testcase_12 AC 90 ms
81,728 KB
testcase_13 AC 92 ms
81,656 KB
testcase_14 AC 105 ms
89,196 KB
testcase_15 AC 76 ms
75,652 KB
testcase_16 AC 77 ms
75,668 KB
testcase_17 AC 75 ms
75,616 KB
testcase_18 AC 76 ms
75,736 KB
testcase_19 AC 79 ms
76,152 KB
testcase_20 AC 79 ms
76,480 KB
testcase_21 AC 80 ms
75,676 KB
testcase_22 AC 83 ms
77,464 KB
testcase_23 AC 95 ms
82,900 KB
testcase_24 AC 100 ms
87,304 KB
testcase_25 AC 110 ms
90,796 KB
testcase_26 AC 112 ms
91,660 KB
testcase_27 AC 95 ms
90,500 KB
testcase_28 AC 95 ms
91,048 KB
testcase_29 AC 110 ms
91,504 KB
testcase_30 AC 111 ms
91,328 KB
testcase_31 AC 109 ms
90,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int,input().split()))
x.sort()
sa = x[1]-x[0]
if sa == 0:
    print("NO")
    exit()
for i in range(2,n):
    if x[i]-x[i-1] != sa:
        print("NO")
        exit()
print("YES")
0