結果

問題 No.275 中央値を求めよ
ユーザー iwkjoseciwkjosec
提出日時 2018-02-23 05:05:20
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 360 bytes
コンパイル時間 1,114 ms
コンパイル使用メモリ 111,668 KB
実行使用メモリ 29,936 KB
最終ジャッジ日時 2024-04-15 12:02:27
合計ジャッジ時間 3,780 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 31 ms
27,196 KB
testcase_04 AC 32 ms
25,012 KB
testcase_05 WA -
testcase_06 AC 33 ms
27,336 KB
testcase_07 AC 36 ms
25,780 KB
testcase_08 AC 37 ms
23,608 KB
testcase_09 AC 36 ms
25,652 KB
testcase_10 WA -
testcase_11 AC 30 ms
25,012 KB
testcase_12 AC 32 ms
27,192 KB
testcase_13 AC 32 ms
25,268 KB
testcase_14 AC 31 ms
23,224 KB
testcase_15 WA -
testcase_16 AC 36 ms
27,808 KB
testcase_17 AC 35 ms
25,652 KB
testcase_18 WA -
testcase_19 AC 37 ms
27,720 KB
testcase_20 AC 36 ms
27,384 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 36 ms
25,476 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 38 ms
27,516 KB
testcase_27 AC 36 ms
25,472 KB
testcase_28 AC 32 ms
25,420 KB
testcase_29 AC 36 ms
25,652 KB
testcase_30 AC 31 ms
25,396 KB
testcase_31 AC 36 ms
25,652 KB
testcase_32 AC 36 ms
27,504 KB
testcase_33 AC 37 ms
25,596 KB
testcase_34 AC 32 ms
23,088 KB
testcase_35 AC 36 ms
25,732 KB
testcase_36 AC 37 ms
27,764 KB
testcase_37 AC 35 ms
25,648 KB
testcase_38 AC 37 ms
27,772 KB
testcase_39 AC 37 ms
27,648 KB
testcase_40 AC 37 ms
25,740 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.IO;
using static System.Console;

class Program
{
    static void Main()
    {
        int N = int.Parse(ReadLine());
        var a = ReadLine().Split().Select(int.Parse).ToList();
        a.Sort();
        WriteLine(N % 2 == 0 ? (a[N / 2 - 1] + a[N / 2]) / 2 : a[N / 2]);
    }
}
0