結果

問題 No.406 鴨等間隔の法則
ユーザー shogo2022shogo2022
提出日時 2017-01-21 05:33:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,656 KB
最終ジャッジ日時 2024-04-24 21:50:03
合計ジャッジ時間 3,985 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
15,052 KB
testcase_01 AC 31 ms
10,624 KB
testcase_02 AC 29 ms
10,496 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 112 ms
20,332 KB
testcase_05 AC 58 ms
14,216 KB
testcase_06 AC 59 ms
14,476 KB
testcase_07 AC 60 ms
14,652 KB
testcase_08 AC 108 ms
21,028 KB
testcase_09 AC 117 ms
21,428 KB
testcase_10 AC 64 ms
14,744 KB
testcase_11 AC 96 ms
19,028 KB
testcase_12 AC 72 ms
16,004 KB
testcase_13 AC 69 ms
15,752 KB
testcase_14 WA -
testcase_15 AC 32 ms
11,392 KB
testcase_16 AC 35 ms
11,520 KB
testcase_17 AC 32 ms
11,008 KB
testcase_18 AC 34 ms
11,392 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 39 ms
12,160 KB
testcase_22 WA -
testcase_23 AC 74 ms
16,360 KB
testcase_24 WA -
testcase_25 AC 122 ms
21,368 KB
testcase_26 WA -
testcase_27 AC 89 ms
21,400 KB
testcase_28 AC 91 ms
21,496 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 113 ms
21,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if kamo_list[0] == 0:
    diff = kamo_list[1]
    start_index = 2
else:
    diff = kamo_list[0]
    start_index = 1

equal_interval = 'YES'
for i in range(start_index,len(kamo_list)):
    if kamo_list[i] - kamo_list[i-1] != diff:
        equal_interval = 'NO'

print(equal_interval)
0