結果

問題 No.406 鴨等間隔の法則
ユーザー miya145592miya145592
提出日時 2023-05-03 15:58:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 206 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 82,140 KB
実行使用メモリ 84,184 KB
最終ジャッジ日時 2024-05-01 14:19:10
合計ジャッジ時間 3,022 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
69,680 KB
testcase_01 AC 32 ms
52,004 KB
testcase_02 AC 32 ms
52,904 KB
testcase_03 AC 32 ms
52,968 KB
testcase_04 AC 64 ms
80,728 KB
testcase_05 AC 48 ms
66,564 KB
testcase_06 AC 49 ms
66,732 KB
testcase_07 AC 49 ms
67,544 KB
testcase_08 AC 63 ms
80,036 KB
testcase_09 AC 68 ms
82,940 KB
testcase_10 AC 49 ms
68,176 KB
testcase_11 AC 59 ms
77,804 KB
testcase_12 AC 51 ms
70,440 KB
testcase_13 AC 51 ms
70,208 KB
testcase_14 AC 68 ms
80,500 KB
testcase_15 AC 39 ms
60,476 KB
testcase_16 AC 39 ms
60,712 KB
testcase_17 AC 37 ms
58,528 KB
testcase_18 AC 35 ms
60,240 KB
testcase_19 AC 38 ms
61,708 KB
testcase_20 AC 39 ms
62,348 KB
testcase_21 AC 40 ms
61,096 KB
testcase_22 AC 42 ms
65,684 KB
testcase_23 AC 51 ms
73,108 KB
testcase_24 AC 59 ms
77,496 KB
testcase_25 AC 69 ms
83,632 KB
testcase_26 AC 69 ms
84,064 KB
testcase_27 AC 54 ms
81,228 KB
testcase_28 AC 56 ms
83,656 KB
testcase_29 AC 72 ms
83,132 KB
testcase_30 AC 70 ms
84,184 KB
testcase_31 AC 68 ms
82,444 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(N-1):
    if X[i+1]-X[i]!=sa:
        print("NO")
        exit()
print("YES")
0