結果
問題 | No.267 トランプソート |
ユーザー |
![]() |
提出日時 | 2018-03-16 08:46:28 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 81 ms / 1,000 ms |
コード長 | 282 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-12-21 14:10:21 |
合計ジャッジ時間 | 2,816 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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]}endgetsx=gets.chomp.splitd=[]c=[]h=[]s=[]x.each{|e|case e[0]when "D"d<<ewhen "C"c<<ewhen "H"h<<ewhen "S"s<<eend}puts (f(d)<<f(c)<<f(h)<<f(s)).flatten*" "