結果
| 問題 |
No.571 3人兄弟(その2)
|
| ユーザー |
|
| 提出日時 | 2017-11-07 16:06:52 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 212 bytes |
| コンパイル時間 | 51 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-24 04:46:59 |
| 合計ジャッジ時間 | 1,854 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 12 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - a Main.rb:1: warning: assigned but unused variable - b Main.rb:1: warning: assigned but unused variable - c Syntax OK
ソースコード
d,f,g = (a,b,c = gets.chomp.split("\n"))
aa = d.split(" ")<< "A",f.split(" ")<< "B",g.split(" ")<< "C"
rank = (aa.sort {|a, b| (b[0] <=> a[0]).nonzero? || (a[1] <=> b[1])})
puts rank[0][2],rank[1][2],rank[2][2]