結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2015-12-29 16:31:02 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 116 ms / 5,000 ms |
コード長 | 647 bytes |
コンパイル時間 | 1,924 ms |
コンパイル使用メモリ | 74,484 KB |
実行使用メモリ | 38,508 KB |
最終ジャッジ日時 | 2024-09-19 08:24:27 |
合計ジャッジ時間 | 3,078 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
import java.io.*; import java.util.*; import java.math.*; class Main82 { public static void out (Object out) { System.out.println(out); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] line = br.readLine().split(" "); int w = Integer.parseInt(line[0]); int h = Integer.parseInt(line[1]); boolean startB = line[2].equals("B"); for (int i = 0; i < h; i++) { boolean flg = startB; for (int j = 0; j < w; j++) { System.out.print(flg ? "B" : "W"); flg = !flg; } out(""); startB = !startB; } } }