結果
| 問題 | No.82 市松模様 |
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-07-02 14:42:13 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 180 ms / 5,000 ms |
| + 527µs | |
| コード長 | 389 bytes |
| 記録 | |
| コンパイル時間 | 1,891 ms |
| コンパイル使用メモリ | 93,556 KB |
| 実行使用メモリ | 48,964 KB |
| 最終ジャッジ日時 | 2026-11-20 20:35:18 |
| 合計ジャッジ時間 | 5,171 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 |
ソースコード
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
int w=sc.nextInt();
int h=sc.nextInt();
char c1=(sc.next()).charAt(0);
char c2= c1=='W' ? 'B' : 'W';
for(int i=0;i<h;i++){
for(int j=0;j<w;j++) System.out.print((i+j)%2==0 ? c1 : c2);
System.out.println();
}
}
}
}
mits58