結果

問題 No.406 鴨等間隔の法則
ユーザー kohei2019kohei2019
提出日時 2022-01-22 19:46:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 91,620 KB
最終ジャッジ日時 2023-08-18 14:34:25
合計ジャッジ時間 5,097 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
81,008 KB
testcase_01 AC 72 ms
71,632 KB
testcase_02 AC 69 ms
71,520 KB
testcase_03 AC 69 ms
71,652 KB
testcase_04 AC 105 ms
89,232 KB
testcase_05 AC 84 ms
79,408 KB
testcase_06 AC 83 ms
79,536 KB
testcase_07 AC 83 ms
80,216 KB
testcase_08 AC 103 ms
89,136 KB
testcase_09 AC 107 ms
91,180 KB
testcase_10 AC 86 ms
81,016 KB
testcase_11 AC 96 ms
87,260 KB
testcase_12 AC 90 ms
82,084 KB
testcase_13 AC 86 ms
81,996 KB
testcase_14 AC 103 ms
89,640 KB
testcase_15 AC 73 ms
75,812 KB
testcase_16 AC 76 ms
75,876 KB
testcase_17 AC 74 ms
75,924 KB
testcase_18 AC 74 ms
75,852 KB
testcase_19 AC 75 ms
76,504 KB
testcase_20 AC 77 ms
76,424 KB
testcase_21 AC 77 ms
75,820 KB
testcase_22 AC 81 ms
77,624 KB
testcase_23 AC 91 ms
83,220 KB
testcase_24 AC 100 ms
87,812 KB
testcase_25 AC 105 ms
91,156 KB
testcase_26 AC 110 ms
91,620 KB
testcase_27 AC 89 ms
90,632 KB
testcase_28 AC 93 ms
91,332 KB
testcase_29 AC 107 ms
91,568 KB
testcase_30 AC 107 ms
91,524 KB
testcase_31 AC 104 ms
90,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
lsx = list(map(int,input().split()))
lsx.sort()
d = lsx[1]-lsx[0]
if d == 0:
    print('NO')
    exit()
for i in range(N-1):
    if d == lsx[i+1]-lsx[i]:
        continue
    print('NO')
    exit()
print('YES')
0