結果

問題 No.406 鴨等間隔の法則
ユーザー SoratopSoratop
提出日時 2020-11-03 19:14:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 18,932 KB
最終ジャッジ日時 2023-09-29 14:56:13
合計ジャッジ時間 3,559 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
12,676 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 15 ms
7,860 KB
testcase_03 AC 15 ms
7,836 KB
testcase_04 AC 63 ms
17,916 KB
testcase_05 AC 32 ms
11,420 KB
testcase_06 AC 33 ms
11,884 KB
testcase_07 AC 33 ms
12,000 KB
testcase_08 AC 68 ms
18,376 KB
testcase_09 AC 68 ms
18,816 KB
testcase_10 AC 36 ms
12,296 KB
testcase_11 AC 57 ms
16,464 KB
testcase_12 AC 41 ms
13,620 KB
testcase_13 AC 39 ms
12,956 KB
testcase_14 AC 105 ms
17,052 KB
testcase_15 AC 17 ms
8,732 KB
testcase_16 AC 19 ms
8,812 KB
testcase_17 AC 17 ms
8,524 KB
testcase_18 AC 18 ms
8,836 KB
testcase_19 AC 24 ms
9,032 KB
testcase_20 AC 27 ms
9,472 KB
testcase_21 AC 21 ms
9,496 KB
testcase_22 AC 38 ms
10,388 KB
testcase_23 AC 43 ms
13,712 KB
testcase_24 AC 94 ms
15,900 KB
testcase_25 AC 68 ms
18,932 KB
testcase_26 AC 126 ms
18,832 KB
testcase_27 AC 47 ms
18,848 KB
testcase_28 AC 47 ms
18,860 KB
testcase_29 AC 124 ms
18,888 KB
testcase_30 AC 123 ms
18,728 KB
testcase_31 AC 65 ms
18,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a= sorted(map(int,input().split()))
b=a[1]-a[0]
for i in range(1,n-1):
    if a[i-1]==a[i] or a[i]==a[i+1] or a[i+1]-a[i]!=b:
        print("NO")
        break
else:
    print('YES')
0