結果
問題 |
No.135 とりあえず1次元の問題
|
ユーザー |
|
提出日時 | 2020-09-06 09:31:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 25,596 KB |
最終ジャッジ日時 | 2024-11-29 06:40:34 |
合計ジャッジ時間 | 2,248 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 18 RE * 1 |
ソースコード
# coding=UTF-8 pointNum = int(input()) pointSet = set(map(int, input().split())) pointList = list(pointSet) center = int(round(len(pointSet) / 2, 0)) beforePoint = abs(pointList[center-2] - pointList[center-1]) afterPoint = abs(pointList[center-1] - pointList[center]) if beforePoint > afterPoint: print(afterPoint) elif beforePoint == afterPoint: print(afterPoint) elif beforePoint < afterPoint: print(beforePoint)