結果
| 問題 |
No.275 中央値を求めよ
|
| コンテスト | |
| ユーザー |
hum_op
|
| 提出日時 | 2016-03-31 14:19:31 |
| 言語 | F# (F# 4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 228 bytes |
| コンパイル時間 | 12,217 ms |
| コンパイル使用メモリ | 184,720 KB |
| 実行使用メモリ | 38,044 KB |
| 最終ジャッジ日時 | 2024-10-02 08:26:37 |
| 合計ジャッジ時間 | 18,127 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 30 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (321 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
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.)
hum_op