結果

問題 No.406 鴨等間隔の法則
ユーザー rocoderrocoder
提出日時 2017-06-16 22:04:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 215 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 10,572 KB
実行使用メモリ 19,068 KB
最終ジャッジ日時 2023-09-21 18:30:13
合計ジャッジ時間 3,496 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
12,564 KB
testcase_01 AC 16 ms
7,820 KB
testcase_02 AC 16 ms
7,764 KB
testcase_03 AC 16 ms
7,884 KB
testcase_04 AC 67 ms
17,908 KB
testcase_05 AC 34 ms
11,512 KB
testcase_06 AC 34 ms
11,828 KB
testcase_07 AC 34 ms
11,964 KB
testcase_08 AC 66 ms
18,416 KB
testcase_09 AC 72 ms
18,704 KB
testcase_10 AC 36 ms
12,460 KB
testcase_11 AC 57 ms
16,360 KB
testcase_12 AC 43 ms
13,524 KB
testcase_13 AC 41 ms
12,960 KB
testcase_14 AC 126 ms
17,052 KB
testcase_15 AC 18 ms
8,704 KB
testcase_16 AC 19 ms
8,856 KB
testcase_17 AC 17 ms
8,428 KB
testcase_18 AC 18 ms
8,840 KB
testcase_19 AC 26 ms
8,916 KB
testcase_20 AC 30 ms
9,392 KB
testcase_21 AC 22 ms
9,352 KB
testcase_22 AC 43 ms
10,520 KB
testcase_23 AC 44 ms
13,764 KB
testcase_24 AC 110 ms
16,128 KB
testcase_25 AC 72 ms
18,732 KB
testcase_26 AC 148 ms
19,060 KB
testcase_27 AC 50 ms
19,068 KB
testcase_28 AC 49 ms
18,948 KB
testcase_29 AC 150 ms
19,056 KB
testcase_30 AC 148 ms
18,900 KB
testcase_31 AC 69 ms
18,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
x=[int(i) for i in input().split()]
x.sort()
#print(x)
i=0
while  i<N-2 and x[i+1]-x[i]!=0 and x[i+2]-x[i+1]==x[i+1]-x[i]:
 #   print(x[i+2])
    i+=1
if i==N-2:
    print("YES")
else:
    print("NO")
0