結果

問題 No.82 市松模様
コンテスト
ユーザー rustGanbaruman
提出日時 2026-02-05 19:01:49
言語 Rust
(1.92.0 + proconio + num + itertools)
結果
WA  
実行時間 -
コード長 345 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,026 ms
コンパイル使用メモリ 203,960 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-02-05 19:02:08
合計ジャッジ時間 2,500 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 4 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused variable: `next`
 --> src/main.rs:8:9
  |
8 |     let next:String;
  |         ^^^^ help: if this is intentional, prefix it with an underscore: `_next`
  |
  = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default

ソースコード

diff #
raw source code

use proconio::input;
fn main() {
    input! {
        w:usize,
        h:usize,
        mut word:char,
    }
    let next:String;
    for _ in 0..h {
        for _ in 0..w {
            print!("{}",word);
            word = if word == 'B' {'W'} else {'B'};
        }
        println!("");
        word = if word == 'B' {'W'} else {'B'};
    }
}
0