結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
kmtrc130
|
| 提出日時 | 2019-03-18 15:22:05 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 5,000 ms |
| コード長 | 627 bytes |
| コンパイル時間 | 1,110 ms |
| コンパイル使用メモリ | 111,484 KB |
| 実行使用メモリ | 25,992 KB |
| 最終ジャッジ日時 | 2024-07-18 09:57:29 |
| 合計ジャッジ時間 | 1,658 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 Program
{
public void Solve()
{
string[] WHC = Console.ReadLine().Split(' ');
string[] color;
if ("B".Equals(WHC[2])) { color = new string[] { "B", "W" }; }
else { color = new string[] { "W", "B" }; }
for (int i = 0; i < int.Parse(WHC[1]); i++)
{
for (int j = 0; j < int.Parse(WHC[0]); j++)
{
Console.Write(color[(i + j) % 2]);
}
Console.WriteLine();
}
}
static void Main()
{
var solver = new Program();
solver.Solve();
}
}
kmtrc130