結果

問題 No.406 鴨等間隔の法則
ユーザー akitsugu777akitsugu777
提出日時 2019-06-13 15:44:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 18,940 KB
最終ジャッジ日時 2023-09-21 19:03:17
合計ジャッジ時間 2,932 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
12,468 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 14 ms
7,784 KB
testcase_03 AC 15 ms
7,756 KB
testcase_04 AC 63 ms
17,908 KB
testcase_05 AC 32 ms
11,724 KB
testcase_06 AC 33 ms
12,024 KB
testcase_07 AC 33 ms
12,184 KB
testcase_08 AC 64 ms
18,288 KB
testcase_09 AC 67 ms
18,712 KB
testcase_10 AC 38 ms
12,400 KB
testcase_11 AC 56 ms
16,392 KB
testcase_12 AC 41 ms
13,412 KB
testcase_13 AC 38 ms
12,992 KB
testcase_14 AC 83 ms
17,136 KB
testcase_15 AC 17 ms
8,836 KB
testcase_16 AC 19 ms
8,988 KB
testcase_17 AC 18 ms
8,300 KB
testcase_18 AC 18 ms
8,856 KB
testcase_19 AC 21 ms
9,076 KB
testcase_20 AC 23 ms
9,392 KB
testcase_21 AC 21 ms
9,572 KB
testcase_22 AC 32 ms
10,528 KB
testcase_23 AC 43 ms
13,656 KB
testcase_24 AC 71 ms
15,924 KB
testcase_25 AC 69 ms
18,760 KB
testcase_26 AC 94 ms
18,872 KB
testcase_27 AC 48 ms
18,940 KB
testcase_28 AC 48 ms
18,916 KB
testcase_29 AC 93 ms
18,888 KB
testcase_30 AC 92 ms
18,672 KB
testcase_31 AC 67 ms
18,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = sorted(list(map(int, input().split())))

d = l[1] - l[0]

for i in range(n-1):
    if l[i+1] - l[i] != d or d == 0:
        print('NO')
        break
else:
    print('YES')
0