結果
| 問題 |
No.267 トランプソート
|
| コンテスト | |
| ユーザー |
TANIGUCHI Kousuke
|
| 提出日時 | 2015-09-24 20:33:54 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 236 bytes |
| コンパイル時間 | 42 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-07-19 09:03:50 |
| 合計ジャッジ時間 | 2,625 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 3 RE * 17 |
コンパイルメッセージ
Main.rb:8: warning: assigned but unused variable - n Syntax OK
ソースコード
S = %w/D C H S/
N = %w/A 2 3 4 5 6 7 8 9 10 J Q K/
D = S.product(N).map {|(suit,num)| suit + num }
I = 52.times.each_with_object({}) do |i,o|
o[D[i]] = i
end
n = gets.to_i
puts gets.chomp.split.sort {|a,b| I[a] <=> I[b]}.join(' ')
TANIGUCHI Kousuke