結果

問題 No.406 鴨等間隔の法則
ユーザー na-shna-sh
提出日時 2019-07-08 13:28:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 290 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 24,316 KB
最終ジャッジ日時 2024-04-16 23:48:40
合計ジャッジ時間 4,261 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
16,360 KB
testcase_01 WA -
testcase_02 AC 31 ms
10,496 KB
testcase_03 AC 37 ms
10,624 KB
testcase_04 AC 99 ms
22,340 KB
testcase_05 AC 54 ms
16,888 KB
testcase_06 AC 54 ms
15,812 KB
testcase_07 AC 55 ms
16,924 KB
testcase_08 AC 97 ms
22,292 KB
testcase_09 AC 104 ms
23,700 KB
testcase_10 AC 57 ms
16,388 KB
testcase_11 AC 82 ms
18,948 KB
testcase_12 AC 64 ms
17,304 KB
testcase_13 AC 62 ms
16,444 KB
testcase_14 WA -
testcase_15 AC 33 ms
11,136 KB
testcase_16 AC 34 ms
12,032 KB
testcase_17 AC 32 ms
11,264 KB
testcase_18 AC 34 ms
12,032 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 37 ms
12,544 KB
testcase_22 WA -
testcase_23 AC 66 ms
17,556 KB
testcase_24 WA -
testcase_25 AC 107 ms
23,932 KB
testcase_26 WA -
testcase_27 AC 69 ms
21,604 KB
testcase_28 AC 79 ms
23,932 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 101 ms
23,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if len(x) != len(set(x)):
    print('NO')
else:
    a = x.pop(0)
    b = x.pop(0)
    d = b - a
    for c in x:
        if b - c != d:
            print('NO')
            break
        b = c
    else:
        print('YES')
0