結果

問題 No.82 市松模様
コンテスト
ユーザー toshiro_yanagi
提出日時 2018-06-03 11:04:32
言語 Nim
(2.2.6)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 223 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,499 ms
コンパイル使用メモリ 70,452 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2026-03-20 05:32:52
合計ジャッジ時間 2,873 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport]

ソースコード

diff #
raw source code

import strutils, sequtils

let
  t = stdin.readLine.split
  (W, H, C) = (t[0].parseInt, t[1].parseInt, t[2])

for i in 0 ..< H:
  for j in 0 ..< W:
    stdout.write(["B", "W"][(int(C == "W") + j mod 2 + i) mod 2])
  echo()
0