結果
| 問題 |
No.275 中央値を求めよ
|
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2016-08-18 02:23:45 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 376 ms / 1,000 ms |
| コード長 | 422 bytes |
| コンパイル時間 | 13,257 ms |
| コンパイル使用メモリ | 196,652 KB |
| 実行使用メモリ | 35,276 KB |
| 最終ジャッジ日時 | 2024-06-25 00:00:17 |
| 合計ジャッジ時間 | 29,220 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (496 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/
ソースコード
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()
kuuso1