結果

問題 No.406 鴨等間隔の法則
ユーザー superzugansuperzugan
提出日時 2021-08-17 22:04:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,736 KB
最終ジャッジ日時 2024-04-19 05:32:05
合計ジャッジ時間 3,463 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
15,408 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 29 ms
10,880 KB
testcase_04 AC 82 ms
20,440 KB
testcase_05 AC 48 ms
14,332 KB
testcase_06 AC 48 ms
14,592 KB
testcase_07 AC 52 ms
14,644 KB
testcase_08 AC 83 ms
21,020 KB
testcase_09 AC 87 ms
21,412 KB
testcase_10 AC 52 ms
15,392 KB
testcase_11 AC 73 ms
19,200 KB
testcase_12 AC 57 ms
16,120 KB
testcase_13 AC 54 ms
15,736 KB
testcase_14 AC 116 ms
19,624 KB
testcase_15 AC 31 ms
11,264 KB
testcase_16 AC 33 ms
11,648 KB
testcase_17 AC 31 ms
11,136 KB
testcase_18 AC 32 ms
11,520 KB
testcase_19 AC 37 ms
11,648 KB
testcase_20 AC 40 ms
12,160 KB
testcase_21 AC 36 ms
12,160 KB
testcase_22 AC 49 ms
13,064 KB
testcase_23 AC 59 ms
16,504 KB
testcase_24 AC 98 ms
18,740 KB
testcase_25 AC 89 ms
21,484 KB
testcase_26 AC 129 ms
21,736 KB
testcase_27 AC 64 ms
21,732 KB
testcase_28 AC 65 ms
21,484 KB
testcase_29 AC 132 ms
21,732 KB
testcase_30 AC 125 ms
21,736 KB
testcase_31 AC 90 ms
21,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
lst=sorted(map(int,input().split()))
tmp=lst[1]-lst[0]
for i in range(1,n-1):
    if lst[i+1]-lst[i]==0:print("NO");exit()
    if tmp!=lst[i+1]-lst[i]:print("NO");exit()
print("YES")
0