結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
soi09476291
|
| 提出日時 | 2019-11-16 18:38:46 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,734 bytes |
| コンパイル時間 | 809 ms |
| コンパイル使用メモリ | 112,248 KB |
| 実行使用メモリ | 26,196 KB |
| 最終ジャッジ日時 | 2024-09-25 03:05:27 |
| 合計ジャッジ時間 | 1,690 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace ConsoleApp11
{
class Program
{
static void Main(string[] args)
{
int count = 0;
var input = Console.ReadLine().Split(' ');
int W = int.Parse(input[0]);
int H = int.Parse(input[1]);
string C = input[2];
for(int i = 0; i < H; i++)
{
while (true)
{
if(C == "B")
{
Console.Write("B");
count++;
if(count >= W)
{
break;
}
Console.Write("W");
count++;
if(count >= W)
{
break;
}
}
if(C == "W")
{
Console.Write("W");
count++;
if(count >= W)
{
break;
}
Console.Write("B");
count++;
if(count >= W)
{
break;
}
}
}
if(C == "W")
{
C = "B";
}
else if(C == "B")
{
C = "W";
}
Console.WriteLine();
count = 0;
}
Console.WriteLine();
}
}
}
soi09476291