結果
| 問題 | No.82 市松模様 |
| コンテスト | |
| ユーザー |
nanophoto12
|
| 提出日時 | 2014-12-02 23:53:51 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 5,000 ms |
| コード長 | 803 bytes |
| 記録 | |
| コンパイル時間 | 820 ms |
| コンパイル使用メモリ | 111,232 KB |
| 実行使用メモリ | 27,880 KB |
| 最終ジャッジ日時 | 2026-03-04 10:08:58 |
| 合計ジャッジ時間 | 1,254 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
class Program82
{
public static void Main(string[] args)
{
var line = Console.ReadLine().Split(' ').ToArray();
var width = int.Parse(line[0]);
var height = int.Parse(line[1]);
var isWhite = line[2] != "B";
for (int y = 0; y < height; y++)
{
string text = string.Empty;
isWhite = !isWhite;
var t = isWhite;
for (int x = 0; x < width; x++)
{
t = !t;
if (t)
{
text += "W";
}
else
{
text += "B";
}
}
Console.WriteLine(text);
}
}
}
nanophoto12