結果

問題 No.406 鴨等間隔の法則
ユーザー mlihua09mlihua09
提出日時 2020-08-27 19:45:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 82,248 KB
実行使用メモリ 86,632 KB
最終ジャッジ日時 2024-04-25 14:50:24
合計ジャッジ時間 3,661 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
68,044 KB
testcase_01 AC 33 ms
52,224 KB
testcase_02 AC 35 ms
51,824 KB
testcase_03 AC 36 ms
52,272 KB
testcase_04 AC 68 ms
80,900 KB
testcase_05 AC 45 ms
67,192 KB
testcase_06 AC 47 ms
67,432 KB
testcase_07 AC 49 ms
68,684 KB
testcase_08 AC 66 ms
80,640 KB
testcase_09 AC 75 ms
83,556 KB
testcase_10 AC 50 ms
68,464 KB
testcase_11 AC 63 ms
77,624 KB
testcase_12 AC 53 ms
70,520 KB
testcase_13 AC 52 ms
71,316 KB
testcase_14 AC 67 ms
82,240 KB
testcase_15 AC 37 ms
58,888 KB
testcase_16 AC 38 ms
59,720 KB
testcase_17 AC 37 ms
58,416 KB
testcase_18 AC 37 ms
60,316 KB
testcase_19 AC 41 ms
61,496 KB
testcase_20 AC 41 ms
62,580 KB
testcase_21 AC 39 ms
61,260 KB
testcase_22 AC 45 ms
65,072 KB
testcase_23 AC 56 ms
71,688 KB
testcase_24 AC 65 ms
78,660 KB
testcase_25 AC 71 ms
82,592 KB
testcase_26 AC 73 ms
85,632 KB
testcase_27 AC 56 ms
82,068 KB
testcase_28 AC 57 ms
82,424 KB
testcase_29 AC 76 ms
86,632 KB
testcase_30 AC 75 ms
85,576 KB
testcase_31 AC 70 ms
82,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


N = int(input())

X = list(map(int, input().split()))

X.sort()

P = X[1] - X[0]

if P != 0 and all(X[i + 1] - X[i] == P for i in range(N - 1)):
    
    print('YES')
    
else:
    
    print('NO')
0