結果

問題 No.275 中央値を求めよ
ユーザー kuuso1kuuso1
提出日時 2016-08-18 02:23:45
言語 F#
(F# 4.0)
結果
AC  
実行時間 106 ms / 1,000 ms
コード長 422 bytes
コンパイル時間 6,027 ms
コンパイル使用メモリ 166,468 KB
実行使用メモリ 27,352 KB
最終ジャッジ日時 2023-09-07 05:33:51
合計ジャッジ時間 11,825 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
24,968 KB
testcase_01 AC 94 ms
25,120 KB
testcase_02 AC 95 ms
25,004 KB
testcase_03 AC 95 ms
26,976 KB
testcase_04 AC 95 ms
27,108 KB
testcase_05 AC 94 ms
27,048 KB
testcase_06 AC 95 ms
25,020 KB
testcase_07 AC 103 ms
27,352 KB
testcase_08 AC 101 ms
25,228 KB
testcase_09 AC 101 ms
25,224 KB
testcase_10 AC 102 ms
27,300 KB
testcase_11 AC 89 ms
22,828 KB
testcase_12 AC 93 ms
25,128 KB
testcase_13 AC 92 ms
25,016 KB
testcase_14 AC 95 ms
23,092 KB
testcase_15 AC 103 ms
25,300 KB
testcase_16 AC 103 ms
25,264 KB
testcase_17 AC 103 ms
25,292 KB
testcase_18 AC 103 ms
25,128 KB
testcase_19 AC 103 ms
27,244 KB
testcase_20 AC 102 ms
25,212 KB
testcase_21 AC 102 ms
25,152 KB
testcase_22 AC 103 ms
25,260 KB
testcase_23 AC 104 ms
25,172 KB
testcase_24 AC 102 ms
25,176 KB
testcase_25 AC 104 ms
27,268 KB
testcase_26 AC 104 ms
25,308 KB
testcase_27 AC 104 ms
25,264 KB
testcase_28 AC 96 ms
25,104 KB
testcase_29 AC 102 ms
27,252 KB
testcase_30 AC 96 ms
25,056 KB
testcase_31 AC 103 ms
25,128 KB
testcase_32 AC 102 ms
23,268 KB
testcase_33 AC 103 ms
25,164 KB
testcase_34 AC 96 ms
25,060 KB
testcase_35 AC 106 ms
25,104 KB
testcase_36 AC 103 ms
25,268 KB
testcase_37 AC 102 ms
25,208 KB
testcase_38 AC 103 ms
25,188 KB
testcase_39 AC 102 ms
25,188 KB
testcase_40 AC 102 ms
23,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System
type Sol() =
    member this.Solve() = 
        let N = stdin.ReadLine() |> int
        let A = stdin.ReadLine().Split() |> Array.map int |> Array.sort
//        let ans = if (N%2) = 0 then double (A.[N/2]+A.[(N/2)-1])/2.0 else double A.[N/2]
//        printfn "%f" ans
        if (N%2) = 0 then double (A.[N/2]+A.[(N/2)-1])/2.0 else double A.[N/2]
        |> printfn "%f" 
let mySol = new Sol()
mySol.Solve()
0