結果

問題 No.275 中央値を求めよ
ユーザー hum_ophum_op
提出日時 2016-04-16 13:07:24
言語 F#
(F# 4.0)
結果
AC  
実行時間 111 ms / 1,000 ms
コード長 284 bytes
コンパイル時間 5,148 ms
コンパイル使用メモリ 162,992 KB
実行使用メモリ 27,392 KB
最終ジャッジ日時 2023-09-07 05:19:49
合計ジャッジ時間 11,144 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
23,048 KB
testcase_01 AC 99 ms
25,048 KB
testcase_02 AC 98 ms
23,104 KB
testcase_03 AC 100 ms
25,044 KB
testcase_04 AC 96 ms
25,212 KB
testcase_05 AC 97 ms
25,136 KB
testcase_06 AC 97 ms
27,152 KB
testcase_07 AC 111 ms
27,392 KB
testcase_08 AC 105 ms
25,224 KB
testcase_09 AC 103 ms
25,440 KB
testcase_10 AC 106 ms
23,276 KB
testcase_11 AC 93 ms
27,068 KB
testcase_12 AC 94 ms
21,188 KB
testcase_13 AC 96 ms
23,104 KB
testcase_14 AC 95 ms
22,952 KB
testcase_15 AC 106 ms
25,336 KB
testcase_16 AC 104 ms
25,332 KB
testcase_17 AC 107 ms
25,196 KB
testcase_18 AC 109 ms
27,308 KB
testcase_19 AC 105 ms
25,280 KB
testcase_20 AC 104 ms
23,240 KB
testcase_21 AC 105 ms
25,316 KB
testcase_22 AC 104 ms
25,260 KB
testcase_23 AC 104 ms
25,260 KB
testcase_24 AC 105 ms
25,364 KB
testcase_25 AC 109 ms
25,400 KB
testcase_26 AC 107 ms
25,472 KB
testcase_27 AC 106 ms
27,380 KB
testcase_28 AC 98 ms
27,200 KB
testcase_29 AC 107 ms
25,248 KB
testcase_30 AC 99 ms
25,032 KB
testcase_31 AC 111 ms
25,288 KB
testcase_32 AC 104 ms
25,468 KB
testcase_33 AC 109 ms
25,452 KB
testcase_34 AC 100 ms
27,048 KB
testcase_35 AC 109 ms
27,292 KB
testcase_36 AC 107 ms
27,240 KB
testcase_37 AC 105 ms
25,376 KB
testcase_38 AC 108 ms
25,360 KB
testcase_39 AC 107 ms
25,360 KB
testcase_40 AC 107 ms
27,320 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let No275 () =
    let N = int <| Console.ReadLine()
    let A = (fun e-> Console.ReadLine().Split(' ') |> Array.map float |> Array.sort) ()
    if N % 2 <> 0 then
        printfn "%f" A.[N/2]
    else
        printfn "%f" <| (A.[N/2] + A.[N/2-1]) / 2.

    ()

No275 ()
0