結果

問題 No.406 鴨等間隔の法則
ユーザー ABKZABKZ
提出日時 2021-07-14 11:47:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 959 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 92,372 KB
最終ジャッジ日時 2023-09-16 10:23:18
合計ジャッジ時間 5,209 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
81,476 KB
testcase_01 AC 67 ms
71,420 KB
testcase_02 AC 74 ms
71,308 KB
testcase_03 AC 70 ms
71,332 KB
testcase_04 AC 105 ms
90,308 KB
testcase_05 AC 84 ms
80,108 KB
testcase_06 AC 89 ms
80,240 KB
testcase_07 AC 84 ms
80,860 KB
testcase_08 AC 102 ms
90,136 KB
testcase_09 AC 106 ms
92,248 KB
testcase_10 AC 86 ms
81,760 KB
testcase_11 AC 99 ms
88,260 KB
testcase_12 AC 87 ms
82,972 KB
testcase_13 AC 90 ms
82,644 KB
testcase_14 AC 112 ms
89,924 KB
testcase_15 AC 78 ms
76,096 KB
testcase_16 AC 76 ms
76,068 KB
testcase_17 AC 76 ms
76,372 KB
testcase_18 AC 74 ms
76,536 KB
testcase_19 AC 73 ms
76,460 KB
testcase_20 AC 77 ms
76,276 KB
testcase_21 AC 74 ms
76,288 KB
testcase_22 AC 81 ms
77,912 KB
testcase_23 AC 92 ms
83,932 KB
testcase_24 AC 105 ms
88,236 KB
testcase_25 AC 109 ms
92,236 KB
testcase_26 AC 117 ms
92,196 KB
testcase_27 AC 99 ms
91,684 KB
testcase_28 AC 92 ms
92,276 KB
testcase_29 AC 115 ms
92,372 KB
testcase_30 AC 114 ms
92,108 KB
testcase_31 AC 105 ms
92,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x = list(map(int, input().split()))
x.sort()

d = (x[-1] - x[0]) / (N - 1)
t = [x[0] + d * i for i in range(N)]

if x == t and d != 0:
    print("YES")
else:
    print("NO")
0