結果

問題 No.1130 Grid Numbers
ユーザー kaiyu-tech
提出日時 2022-02-04 21:00:28
言語 Ruby
(3.4.1)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-06-11 11:23:42
合計ジャッジ時間 1,682 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

inputs = []

inputs.push(gets.split)

h = inputs[0][0].to_i
w = inputs[0][1].to_i

h.times { inputs.push(gets.split) }

data = []
for i in 0...h do
    data += inputs[i + 1]
end

data.sort!

for j in 0...h do
    for i in 0...w do
        print data[j * w + i].to_s + ' '
    end
    puts "\n"
end
0