結果

問題 No.406 鴨等間隔の法則
ユーザー convexineqconvexineq
提出日時 2021-02-10 00:10:06
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 1,947 ms
コンパイル使用メモリ 86,464 KB
実行使用メモリ 91,652 KB
最終ジャッジ日時 2023-09-21 11:38:01
合計ジャッジ時間 6,385 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
80,764 KB
testcase_01 AC 76 ms
71,372 KB
testcase_02 AC 81 ms
71,132 KB
testcase_03 AC 75 ms
71,476 KB
testcase_04 AC 109 ms
88,944 KB
testcase_05 AC 90 ms
79,012 KB
testcase_06 AC 89 ms
79,364 KB
testcase_07 AC 90 ms
79,900 KB
testcase_08 AC 109 ms
89,208 KB
testcase_09 AC 113 ms
90,804 KB
testcase_10 AC 93 ms
80,704 KB
testcase_11 AC 107 ms
87,072 KB
testcase_12 AC 94 ms
81,884 KB
testcase_13 AC 94 ms
81,784 KB
testcase_14 AC 112 ms
89,612 KB
testcase_15 AC 83 ms
76,188 KB
testcase_16 AC 79 ms
75,616 KB
testcase_17 AC 77 ms
75,724 KB
testcase_18 AC 79 ms
75,620 KB
testcase_19 AC 84 ms
76,124 KB
testcase_20 AC 83 ms
76,408 KB
testcase_21 AC 81 ms
75,808 KB
testcase_22 AC 87 ms
77,480 KB
testcase_23 AC 96 ms
82,768 KB
testcase_24 AC 112 ms
87,664 KB
testcase_25 AC 114 ms
90,904 KB
testcase_26 AC 116 ms
91,480 KB
testcase_27 AC 102 ms
91,260 KB
testcase_28 AC 100 ms
91,020 KB
testcase_29 AC 117 ms
91,652 KB
testcase_30 AC 118 ms
91,440 KB
testcase_31 AC 115 ms
90,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = sorted(map(int,input().split()))
ok = any(ai != a[0] for ai in a) and all(a[i+1]-a[i] == a[1]-a[0] for i in range(n-1))
print("YES" if ok else "NO")
0