結果

問題 No.406 鴨等間隔の法則
ユーザー wata_pythonwata_python
提出日時 2019-08-16 13:56:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 11,836 KB
実行使用メモリ 21,060 KB
最終ジャッジ日時 2023-10-22 03:43:06
合計ジャッジ時間 4,469 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
14,532 KB
testcase_01 WA -
testcase_02 AC 31 ms
10,096 KB
testcase_03 AC 30 ms
10,096 KB
testcase_04 AC 82 ms
19,876 KB
testcase_05 AC 49 ms
13,740 KB
testcase_06 AC 48 ms
13,876 KB
testcase_07 AC 48 ms
13,932 KB
testcase_08 AC 79 ms
20,340 KB
testcase_09 AC 84 ms
20,748 KB
testcase_10 AC 50 ms
14,380 KB
testcase_11 AC 71 ms
18,400 KB
testcase_12 AC 57 ms
15,448 KB
testcase_13 AC 54 ms
14,920 KB
testcase_14 WA -
testcase_15 AC 31 ms
10,728 KB
testcase_16 AC 32 ms
10,868 KB
testcase_17 AC 31 ms
10,488 KB
testcase_18 AC 32 ms
10,936 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 37 ms
11,468 KB
testcase_22 WA -
testcase_23 AC 60 ms
15,724 KB
testcase_24 WA -
testcase_25 AC 90 ms
20,812 KB
testcase_26 WA -
testcase_27 AC 62 ms
20,984 KB
testcase_28 AC 62 ms
20,812 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 89 ms
20,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=sorted(list(map(int, input().split())))
X=0
for i in range(n-1):
    x=l[i]-l[i+1]
    if i==0:
        X=x
        continue
    if x!=X or x==X:
        print("NO")
        break
    X=x
else:
    print("YES")
0