結果

問題 No.406 鴨等間隔の法則
ユーザー EOS2122EOS2122
提出日時 2016-09-01 22:34:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 19,108 KB
最終ジャッジ日時 2023-09-21 18:06:21
合計ジャッジ時間 3,166 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
12,688 KB
testcase_01 AC 16 ms
7,772 KB
testcase_02 AC 16 ms
7,732 KB
testcase_03 AC 15 ms
7,764 KB
testcase_04 AC 65 ms
17,956 KB
testcase_05 AC 32 ms
11,760 KB
testcase_06 AC 33 ms
11,848 KB
testcase_07 AC 33 ms
12,072 KB
testcase_08 AC 64 ms
18,360 KB
testcase_09 AC 69 ms
18,732 KB
testcase_10 AC 35 ms
12,632 KB
testcase_11 AC 55 ms
16,376 KB
testcase_12 AC 41 ms
13,476 KB
testcase_13 AC 39 ms
12,904 KB
testcase_14 AC 80 ms
17,120 KB
testcase_15 AC 18 ms
8,844 KB
testcase_16 AC 18 ms
8,888 KB
testcase_17 AC 17 ms
8,560 KB
testcase_18 AC 18 ms
8,816 KB
testcase_19 AC 21 ms
9,004 KB
testcase_20 AC 24 ms
9,512 KB
testcase_21 AC 22 ms
9,552 KB
testcase_22 AC 31 ms
10,384 KB
testcase_23 AC 42 ms
13,744 KB
testcase_24 AC 68 ms
16,188 KB
testcase_25 AC 70 ms
18,880 KB
testcase_26 AC 94 ms
18,964 KB
testcase_27 AC 67 ms
19,108 KB
testcase_28 AC 48 ms
18,920 KB
testcase_29 AC 97 ms
18,964 KB
testcase_30 AC 93 ms
18,776 KB
testcase_31 AC 66 ms
18,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
data = list(map(int,input().split()))
data = sorted(data)
#print(data)
OK_flg = True
d = data[1]-data[0]
if(d==0):
    OK_flg = False
for i in range(1,len(data)):
    if(d != (data[i] - data[i-1])):
        OK_flg = False
        break
if(OK_flg):
    print("YES")
else:
    print("NO")
0