結果

問題 No.82 市松模様
ユーザー ねずねず
提出日時 2018-03-04 13:06:56
言語 PHP
(8.3.4)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 747 ms
コンパイル使用メモリ 11,868 KB
実行使用メモリ 12,296 KB
最終ジャッジ日時 2023-09-21 12:10:25
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,256 KB
testcase_01 AC 8 ms
12,256 KB
testcase_02 AC 8 ms
12,204 KB
testcase_03 AC 8 ms
12,236 KB
testcase_04 AC 7 ms
12,296 KB
testcase_05 AC 7 ms
12,240 KB
testcase_06 AC 8 ms
12,232 KB
testcase_07 AC 8 ms
12,252 KB
testcase_08 AC 11 ms
12,208 KB
testcase_09 AC 10 ms
12,228 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
list($w, $h, $c) = explode(' ', trim(fgets(STDIN)));
for ($hi = 0; $hi < $h; $hi++) {
    $out = $c;
    for ($wi = 0; $wi < $w; $wi++) {
        echo $out;
        $out = $out == 'B' ? 'W' : 'B';
    }
    $c = $c == 'B' ? 'W' : 'B';
    echo PHP_EOL;
}
0