結果

問題 No.565 回転拡大
ユーザー mai
提出日時 2017-09-08 22:42:23
言語 Ruby
(3.4.1)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-11-07 06:25:26
合計ジャッジ時間 4,253 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def ascan; gets.split.map(&:to_i);end

r,k = ascan
h,w = ascan
r/=90

field = []
#h.times{
#    field << gets.chomp
#}
h=0;w=0
while cin = gets
    cin.chomp!
    h+=1
    w = cin.size
    field << cin
end

r.times{
    new_field = Array.new(w){"%"*h}
    w.times{|y|
        h.times{|x|
            new_field[y][x] = field[h-x-1][y]
        }
    }
    h,w = w,h
    field = new_field
}

field.map!{|l|
    l.chars.map{|s| s*k}*""
}

field.each{|l|
    k.times{puts l}
}
0