結果

問題 No.406 鴨等間隔の法則
ユーザー dangodango
提出日時 2023-06-05 19:33:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 18,964 KB
最終ジャッジ日時 2023-08-28 09:40:33
合計ジャッジ時間 2,936 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
12,564 KB
testcase_01 AC 15 ms
7,808 KB
testcase_02 AC 15 ms
8,256 KB
testcase_03 AC 15 ms
7,792 KB
testcase_04 AC 64 ms
17,936 KB
testcase_05 AC 32 ms
11,724 KB
testcase_06 AC 32 ms
11,864 KB
testcase_07 AC 32 ms
11,936 KB
testcase_08 AC 65 ms
18,428 KB
testcase_09 AC 65 ms
18,936 KB
testcase_10 AC 34 ms
12,612 KB
testcase_11 AC 54 ms
16,548 KB
testcase_12 AC 39 ms
13,588 KB
testcase_13 AC 37 ms
13,028 KB
testcase_14 AC 75 ms
17,128 KB
testcase_15 AC 18 ms
8,740 KB
testcase_16 AC 18 ms
8,864 KB
testcase_17 AC 16 ms
8,576 KB
testcase_18 AC 16 ms
8,920 KB
testcase_19 AC 19 ms
9,128 KB
testcase_20 AC 22 ms
9,476 KB
testcase_21 AC 20 ms
9,468 KB
testcase_22 AC 29 ms
10,456 KB
testcase_23 AC 40 ms
13,812 KB
testcase_24 AC 65 ms
15,980 KB
testcase_25 AC 67 ms
18,944 KB
testcase_26 AC 86 ms
18,880 KB
testcase_27 AC 66 ms
18,840 KB
testcase_28 AC 46 ms
18,836 KB
testcase_29 AC 89 ms
18,964 KB
testcase_30 AC 86 ms
18,760 KB
testcase_31 AC 63 ms
18,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(sorted(list(map(int,input().split()))))
SA = A[1] - A[0]
for i in range(1, N):
    if A[i] - A[i-1] != SA:
        print("NO")
        exit(0)
if SA == 0:
    print("NO")
else:
    print("YES")
0