結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
nanophoto12
|
| 提出日時 | 2014-12-02 23:53:51 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 5,000 ms |
| コード長 | 803 bytes |
| コンパイル時間 | 2,343 ms |
| コンパイル使用メモリ | 104,704 KB |
| 実行使用メモリ | 18,944 KB |
| 最終ジャッジ日時 | 2024-06-11 07:50:20 |
| 合計ジャッジ時間 | 1,630 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / 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