結果

問題 No.406 鴨等間隔の法則
ユーザー akasatanananaakasatananana
提出日時 2019-09-18 23:40:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 297 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 29,368 KB
最終ジャッジ日時 2023-09-24 22:32:09
合計ジャッジ時間 4,847 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
29,368 KB
testcase_01 AC 16 ms
7,860 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 16 ms
7,760 KB
testcase_04 AC 70 ms
17,864 KB
testcase_05 AC 35 ms
11,484 KB
testcase_06 AC 37 ms
11,944 KB
testcase_07 AC 37 ms
11,884 KB
testcase_08 AC 73 ms
18,412 KB
testcase_09 AC 76 ms
18,816 KB
testcase_10 AC 39 ms
12,332 KB
testcase_11 AC 60 ms
16,488 KB
testcase_12 AC 45 ms
13,452 KB
testcase_13 AC 43 ms
12,936 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

a=int(input())
b=[int(i) for i in input().split()]
b.sort()

for i in range(1,a):
    if i==1:
        c=b[i]-b[i-1]
    elif b.count(b[0])>=2:
        print("NO")
        break
    elif i>=2:
        d=b[i]-b[i-1]
        if c!=d:
            print("NO")
            break
else:
    print("YES")
0