結果
問題 | No.275 中央値を求めよ |
ユーザー |
|
提出日時 | 2016-01-27 22:34:54 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 88 ms / 1,000 ms |
コード長 | 172 bytes |
コンパイル時間 | 44 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-24 23:41:07 |
合計ジャッジ時間 | 4,531 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.to_ilist = gets.chomp.split(" ").map &:to_ilist.sort!if n%2 == 1puts "#{list[(n-1)/2]}"elsea = list[n/2]b = list[n/2-1]puts "#{(a+b).to_f/2}"end