結果

問題 No.406 鴨等間隔の法則
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-10-11 08:20:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 1,476 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 102,052 KB
最終ジャッジ日時 2023-10-13 08:28:58
合計ジャッジ時間 6,532 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
84,796 KB
testcase_01 AC 65 ms
71,196 KB
testcase_02 AC 67 ms
71,564 KB
testcase_03 AC 65 ms
71,212 KB
testcase_04 AC 109 ms
98,744 KB
testcase_05 AC 83 ms
82,632 KB
testcase_06 AC 87 ms
82,924 KB
testcase_07 AC 83 ms
83,684 KB
testcase_08 AC 108 ms
98,720 KB
testcase_09 AC 115 ms
101,808 KB
testcase_10 AC 87 ms
85,016 KB
testcase_11 AC 107 ms
95,856 KB
testcase_12 AC 96 ms
87,772 KB
testcase_13 AC 87 ms
87,476 KB
testcase_14 AC 109 ms
98,748 KB
testcase_15 AC 69 ms
75,680 KB
testcase_16 AC 73 ms
75,824 KB
testcase_17 AC 71 ms
75,828 KB
testcase_18 AC 71 ms
75,804 KB
testcase_19 AC 72 ms
76,376 KB
testcase_20 AC 75 ms
76,960 KB
testcase_21 AC 72 ms
76,460 KB
testcase_22 AC 77 ms
79,696 KB
testcase_23 AC 91 ms
89,084 KB
testcase_24 AC 102 ms
96,092 KB
testcase_25 AC 114 ms
101,752 KB
testcase_26 AC 117 ms
102,052 KB
testcase_27 AC 83 ms
84,444 KB
testcase_28 AC 101 ms
101,180 KB
testcase_29 AC 115 ms
101,932 KB
testcase_30 AC 115 ms
101,912 KB
testcase_31 AC 118 ms
101,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
X = sorted(list(set(map(int,input().split()))))
if n != len(X):
    print("NO")
else:
    cnt = X[1] - X[0]
    for i in range(1,n-1):
        if cnt != X[i+1] - X[i]:
            print("NO")
            exit()
    print("YES")
0