結果

問題 No.406 鴨等間隔の法則
ユーザー sickofrainsickofrain
提出日時 2016-10-21 15:16:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 633 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,736 KB
最終ジャッジ日時 2024-04-24 21:36:41
合計ジャッジ時間 4,081 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
15,412 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 WA -
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 81 ms
20,316 KB
testcase_05 AC 48 ms
14,332 KB
testcase_06 AC 48 ms
14,460 KB
testcase_07 AC 48 ms
14,768 KB
testcase_08 AC 81 ms
20,888 KB
testcase_09 AC 88 ms
21,412 KB
testcase_10 AC 51 ms
15,428 KB
testcase_11 AC 73 ms
18,948 KB
testcase_12 AC 59 ms
16,116 KB
testcase_13 AC 57 ms
15,740 KB
testcase_14 WA -
testcase_15 AC 31 ms
11,264 KB
testcase_16 AC 33 ms
11,648 KB
testcase_17 AC 31 ms
10,880 KB
testcase_18 AC 31 ms
11,520 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 35 ms
12,032 KB
testcase_22 WA -
testcase_23 AC 60 ms
16,508 KB
testcase_24 WA -
testcase_25 AC 87 ms
21,356 KB
testcase_26 WA -
testcase_27 AC 63 ms
21,608 KB
testcase_28 AC 62 ms
21,484 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 83 ms
20,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x = sorted(list(map(int,input().split())))
k = x[1] - x[0]
if k == 0:
    print("NO")
    exit()
for i in range(1,N-1):
    if x[i+1] - x[i] != k:
        print("NO")
        exit()
    else:
        print("YES")
0