結果
問題 | No.275 中央値を求めよ |
ユーザー |
![]() |
提出日時 | 2016-02-24 22:24:51 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 297 bytes |
コンパイル時間 | 2,693 ms |
コンパイル使用メモリ | 159,488 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 03:04:45 |
合計ジャッジ時間 | 3,894 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
import std.stdio,std.conv,std.string,std.range,std.math,std.bigint,std.algorithm;void main(){auto N = readln.strip.to!int;auto A = readln.split.to!(real[]);(A.sort.length % 2 ? A[$ / 2] : (A[$ / 2] + A[$ / 2 - 1]) / 2).writeln;}