結果
問題 | No.275 中央値を求めよ |
ユーザー | pirorirori_n712 |
提出日時 | 2018-07-06 00:34:28 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 389 bytes |
コンパイル時間 | 2,332 ms |
コンパイル使用メモリ | 103,724 KB |
実行使用メモリ | 27,812 KB |
最終ジャッジ日時 | 2023-09-13 18:03:25 |
合計ジャッジ時間 | 7,126 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | WA | - |
testcase_03 | AC | 62 ms
21,708 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 69 ms
21,828 KB |
testcase_09 | AC | 69 ms
21,828 KB |
testcase_10 | WA | - |
testcase_11 | AC | 63 ms
19,536 KB |
testcase_12 | RE | - |
testcase_13 | AC | 62 ms
23,740 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 74 ms
23,860 KB |
testcase_17 | AC | 75 ms
23,904 KB |
testcase_18 | WA | - |
testcase_19 | AC | 70 ms
19,912 KB |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 70 ms
21,992 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 69 ms
19,888 KB |
testcase_27 | AC | 71 ms
21,864 KB |
testcase_28 | AC | 62 ms
19,644 KB |
testcase_29 | AC | 70 ms
23,728 KB |
testcase_30 | AC | 64 ms
23,812 KB |
testcase_31 | WA | - |
testcase_32 | AC | 69 ms
23,764 KB |
testcase_33 | AC | 70 ms
23,908 KB |
testcase_34 | AC | 62 ms
21,736 KB |
testcase_35 | AC | 70 ms
21,756 KB |
testcase_36 | AC | 69 ms
21,728 KB |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | AC | 70 ms
23,756 KB |
testcase_40 | AC | 70 ms
21,820 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; class No275{ static void Main(){ var n=Int32.Parse(Console.ReadLine()); var i=Console.ReadLine().Split(' ').Select(x=>Int32.Parse(x)).OrderBy(x=>x).ToArray(); var b=n%2; if(b!=0){ Console.WriteLine(i[n/2]); }else{ n/=2; Console.WriteLine((i[n]+i[n+1])/2.0); } } }