結果
| 問題 | No.267 トランプソート |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-03-16 08:46:28 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 1,000 ms |
| コード長 | 282 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 14,976 KB |
| 最終ジャッジ日時 | 2026-05-28 06:20:31 |
| 合計ジャッジ時間 | 2,532 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
Syntax OK
ソースコード
def f(x)
res=x.map{|e|
["A23456789TJQK".index(e[1]),e]
}
return res.sort.map{|e|
e[1]
}
end
gets
x=gets.chomp.split
d=[]
c=[]
h=[]
s=[]
x.each{|e|
case e[0]
when "D"
d<<e
when "C"
c<<e
when "H"
h<<e
when "S"
s<<e
end
}
puts (f(d)<<f(c)<<f(h)<<f(s)).flatten*" "
horiesiniti