結果
問題 |
No.82 市松模様
|
ユーザー |
![]() |
提出日時 | 2022-11-03 17:49:47 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 227 bytes |
コンパイル時間 | 44 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-07-18 02:06:46 |
合計ジャッジ時間 | 1,476 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 5 WA * 2 |
コンパイルメッセージ
Main.rb:7: warning: `/' after local variable or literal is interpreted as binary operator Main.rb:7: warning: even though it seems like regexp literal Syntax OK
ソースコード
w, h, c = gets.split w = w.to_i h = h.to_i d = "BW".tr(c, "") e = c + d l1 = w.even? ? e * (w / 2) : e * (w /2) + c l2 = l1[1..] + d a, b = h.divmod(2) a.times do |i| puts l1 puts l2 end b.times do |j| puts l1 end