結果

問題 No.275 中央値を求めよ
ユーザー ixTL255ixTL255
提出日時 2018-07-09 21:37:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 336 bytes
コンパイル時間 3,753 ms
コンパイル使用メモリ 104,472 KB
実行使用メモリ 25,868 KB
最終ジャッジ日時 2023-09-07 07:31:34
合計ジャッジ時間 7,452 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
23,632 KB
testcase_01 AC 75 ms
23,500 KB
testcase_02 AC 73 ms
21,704 KB
testcase_03 AC 72 ms
25,644 KB
testcase_04 AC 73 ms
25,600 KB
testcase_05 AC 71 ms
23,540 KB
testcase_06 AC 73 ms
23,720 KB
testcase_07 AC 81 ms
25,836 KB
testcase_08 AC 79 ms
25,784 KB
testcase_09 AC 79 ms
25,768 KB
testcase_10 AC 78 ms
21,668 KB
testcase_11 AC 70 ms
25,552 KB
testcase_12 AC 68 ms
23,680 KB
testcase_13 AC 68 ms
23,720 KB
testcase_14 AC 67 ms
23,684 KB
testcase_15 AC 80 ms
23,812 KB
testcase_16 AC 80 ms
23,760 KB
testcase_17 AC 80 ms
23,704 KB
testcase_18 AC 80 ms
25,860 KB
testcase_19 AC 79 ms
23,800 KB
testcase_20 AC 78 ms
23,696 KB
testcase_21 AC 79 ms
21,720 KB
testcase_22 AC 81 ms
25,864 KB
testcase_23 AC 79 ms
23,780 KB
testcase_24 AC 80 ms
23,892 KB
testcase_25 AC 79 ms
25,868 KB
testcase_26 AC 78 ms
21,816 KB
testcase_27 AC 79 ms
25,836 KB
testcase_28 AC 71 ms
25,656 KB
testcase_29 AC 80 ms
23,964 KB
testcase_30 AC 72 ms
23,592 KB
testcase_31 AC 79 ms
23,816 KB
testcase_32 AC 79 ms
23,880 KB
testcase_33 AC 79 ms
23,764 KB
testcase_34 AC 71 ms
23,560 KB
testcase_35 AC 78 ms
23,680 KB
testcase_36 AC 78 ms
23,788 KB
testcase_37 AC 77 ms
23,884 KB
testcase_38 AC 79 ms
23,960 KB
testcase_39 AC 79 ms
23,716 KB
testcase_40 AC 82 ms
23,808 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;

public class Yuki275
{
	public static void Main()
	{
		var n = int.Parse(Console.ReadLine());
		var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).OrderBy(y => y).ToList();
		Console.WriteLine(n % 2 != 0 ? a[n / 2] : (a[n / 2] + a[n / 2 - 1]) / 2.0);
	}
}
0