結果

問題 No.275 中央値を求めよ
ユーザー _matumo__matumo_
提出日時 2018-05-26 23:19:33
言語 C#
(csc 3.9.0)
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 507 bytes
コンパイル時間 2,082 ms
使用メモリ 26,312 KB
最終ジャッジ日時 2023-01-23 00:11:55
合計ジャッジ時間 6,586 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 67 ms
24,044 KB
testcase_01 AC 67 ms
24,040 KB
testcase_02 AC 66 ms
24,080 KB
testcase_03 AC 67 ms
24,140 KB
testcase_04 AC 66 ms
24,152 KB
testcase_05 AC 67 ms
24,036 KB
testcase_06 AC 67 ms
24,072 KB
testcase_07 AC 74 ms
26,228 KB
testcase_08 AC 73 ms
24,176 KB
testcase_09 AC 74 ms
26,312 KB
testcase_10 AC 73 ms
24,296 KB
testcase_11 AC 65 ms
26,048 KB
testcase_12 AC 64 ms
21,996 KB
testcase_13 AC 65 ms
24,080 KB
testcase_14 AC 64 ms
22,100 KB
testcase_15 AC 75 ms
26,220 KB
testcase_16 AC 74 ms
24,300 KB
testcase_17 AC 75 ms
24,220 KB
testcase_18 AC 74 ms
24,212 KB
testcase_19 AC 74 ms
24,188 KB
testcase_20 AC 74 ms
24,264 KB
testcase_21 AC 74 ms
24,148 KB
testcase_22 AC 73 ms
24,312 KB
testcase_23 AC 74 ms
24,272 KB
testcase_24 AC 75 ms
24,428 KB
testcase_25 AC 73 ms
24,248 KB
testcase_26 AC 75 ms
26,276 KB
testcase_27 AC 74 ms
26,276 KB
testcase_28 AC 66 ms
24,260 KB
testcase_29 AC 74 ms
26,192 KB
testcase_30 AC 66 ms
24,024 KB
testcase_31 AC 74 ms
26,244 KB
testcase_32 AC 72 ms
26,204 KB
testcase_33 AC 74 ms
24,320 KB
testcase_34 AC 67 ms
26,240 KB
testcase_35 AC 73 ms
24,332 KB
testcase_36 AC 73 ms
24,352 KB
testcase_37 AC 73 ms
24,204 KB
testcase_38 AC 73 ms
26,236 KB
testcase_39 AC 74 ms
24,256 KB
testcase_40 AC 73 ms
24,260 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YukiCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();
            var pa = Console.ReadLine().Split().Select(int.Parse).OrderBy(n=>n).ToList();
            int cn = pa.Count;
            int m1 = pa[(cn - 1) / 2];
            int m2 = pa[cn / 2];

            Console.WriteLine((m1 + m2) / 2.0);
            Console.ReadLine();
        }
    }
}
0