結果

問題 No.406 鴨等間隔の法則
ユーザー aaaaaaaaaa
提出日時 2017-03-02 14:22:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 197 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,740 KB
最終ジャッジ日時 2024-04-25 00:52:02
合計ジャッジ時間 3,433 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
15,280 KB
testcase_01 AC 29 ms
10,496 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 AC 84 ms
20,440 KB
testcase_05 AC 51 ms
14,332 KB
testcase_06 AC 51 ms
14,340 KB
testcase_07 AC 51 ms
14,640 KB
testcase_08 AC 86 ms
20,884 KB
testcase_09 AC 92 ms
21,288 KB
testcase_10 AC 54 ms
15,524 KB
testcase_11 AC 76 ms
19,032 KB
testcase_12 AC 60 ms
15,992 KB
testcase_13 AC 59 ms
15,576 KB
testcase_14 WA -
testcase_15 AC 33 ms
11,136 KB
testcase_16 AC 35 ms
11,520 KB
testcase_17 AC 31 ms
10,880 KB
testcase_18 AC 33 ms
11,392 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 36 ms
12,032 KB
testcase_22 WA -
testcase_23 AC 64 ms
16,512 KB
testcase_24 WA -
testcase_25 AC 96 ms
21,480 KB
testcase_26 WA -
testcase_27 AC 68 ms
21,608 KB
testcase_28 AC 67 ms
21,352 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 89 ms
21,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

input()
a=sorted(list(map(int,input().split())))
pre=a[1];dif=a[1]-a[0]
if dif==0:print('NO');exit()
for x in a[2:]:
    if dif==0 or x-pre!=dif: print('NO');exit()
    pre=x;dif=x-pre
print('YES')
0