結果

問題 No.406 鴨等間隔の法則
ユーザー nasubi24nasubi24
提出日時 2020-11-02 19:04:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 203 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 19,040 KB
最終ジャッジ日時 2023-09-29 12:15:48
合計ジャッジ時間 4,052 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
12,520 KB
testcase_01 AC 14 ms
7,824 KB
testcase_02 AC 14 ms
7,848 KB
testcase_03 WA -
testcase_04 AC 61 ms
17,988 KB
testcase_05 AC 30 ms
11,492 KB
testcase_06 AC 32 ms
11,956 KB
testcase_07 AC 31 ms
12,056 KB
testcase_08 AC 66 ms
18,368 KB
testcase_09 AC 65 ms
18,968 KB
testcase_10 AC 34 ms
12,292 KB
testcase_11 AC 53 ms
16,416 KB
testcase_12 AC 39 ms
13,560 KB
testcase_13 AC 38 ms
13,096 KB
testcase_14 AC 76 ms
17,232 KB
testcase_15 WA -
testcase_16 AC 17 ms
8,968 KB
testcase_17 AC 16 ms
8,480 KB
testcase_18 AC 17 ms
8,844 KB
testcase_19 AC 20 ms
9,076 KB
testcase_20 AC 22 ms
9,400 KB
testcase_21 AC 20 ms
9,312 KB
testcase_22 AC 29 ms
10,464 KB
testcase_23 AC 40 ms
13,860 KB
testcase_24 AC 66 ms
15,900 KB
testcase_25 AC 65 ms
19,032 KB
testcase_26 AC 86 ms
18,824 KB
testcase_27 WA -
testcase_28 AC 45 ms
18,940 KB
testcase_29 AC 88 ms
18,900 KB
testcase_30 AC 85 ms
18,780 KB
testcase_31 AC 64 ms
18,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
x=list(map(int,input().split()))
x.sort()
num=x[1]-x[0]
ans=0
for i in range(1,n-1):
    if x[i+1]-x[i]!=num:
        ans=1
        break
if ans==0:
    print("YES")
else:
    print("NO")
0