結果

問題 No.406 鴨等間隔の法則
ユーザー kisaragi211kisaragi211
提出日時 2018-01-17 22:55:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,792 KB
最終ジャッジ日時 2024-04-25 03:22:09
合計ジャッジ時間 3,718 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
15,208 KB
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 WA -
testcase_04 AC 99 ms
20,328 KB
testcase_05 AC 54 ms
14,604 KB
testcase_06 AC 54 ms
14,352 KB
testcase_07 AC 56 ms
15,428 KB
testcase_08 AC 105 ms
20,904 KB
testcase_09 AC 111 ms
21,300 KB
testcase_10 AC 61 ms
15,072 KB
testcase_11 AC 94 ms
18,904 KB
testcase_12 AC 66 ms
16,064 KB
testcase_13 AC 66 ms
15,748 KB
testcase_14 AC 103 ms
19,636 KB
testcase_15 WA -
testcase_16 AC 33 ms
11,520 KB
testcase_17 AC 33 ms
11,136 KB
testcase_18 AC 35 ms
11,648 KB
testcase_19 AC 36 ms
11,776 KB
testcase_20 AC 39 ms
12,032 KB
testcase_21 AC 39 ms
12,032 KB
testcase_22 AC 50 ms
13,468 KB
testcase_23 AC 68 ms
16,364 KB
testcase_24 AC 89 ms
18,568 KB
testcase_25 AC 114 ms
21,376 KB
testcase_26 AC 115 ms
21,656 KB
testcase_27 WA -
testcase_28 AC 78 ms
21,500 KB
testcase_29 AC 112 ms
21,512 KB
testcase_30 AC 112 ms
21,412 KB
testcase_31 AC 111 ms
21,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    x = list(map(int, input().split()))
    x.sort()
    dif = []
    for i in range(N-1):
        dif.append(x[i+1] - x[i])
    for j in range(len(dif)-1):
        if dif[j]!=dif[j+1]:
            return print('NO')
    return print('YES')
        
if __name__ == '__main__':
    main()
0