結果

問題 No.275 中央値を求めよ
ユーザー hum_ophum_op
提出日時 2016-03-31 14:19:31
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 6,398 ms
コンパイル使用メモリ 186,016 KB
実行使用メモリ 38,336 KB
最終ジャッジ日時 2024-04-10 06:46:35
合計ジャッジ時間 17,131 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 355 ms
35,600 KB
testcase_01 AC 342 ms
36,292 KB
testcase_02 WA -
testcase_03 AC 70 ms
30,592 KB
testcase_04 AC 352 ms
35,504 KB
testcase_05 AC 346 ms
35,604 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 67 ms
30,592 KB
testcase_12 AC 342 ms
35,256 KB
testcase_13 AC 75 ms
30,848 KB
testcase_14 AC 349 ms
36,408 KB
testcase_15 WA -
testcase_16 AC 350 ms
36,408 KB
testcase_17 AC 352 ms
36,400 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (222 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System
let N = int <| Console.ReadLine()
let A = Array.sort <| Console.ReadLine().Split(' ')

if N % 2 <> 0 then
    printfn "%s" A.[(N-1)/2]
else 
    printfn "%f" ((Double.Parse A.[(N-1)/2] +  Double.Parse A.[N/2]) / 2.)
0