結果

問題 No.82 市松模様
ユーザー huffman56
提出日時 2022-06-19 17:04:07
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 1,312 bytes
コンパイル時間 1,273 ms
コンパイル使用メモリ 105,984 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2024-10-11 20:02:18
合計ジャッジ時間 1,775 ms
ジャッジサーバーID
(参考情報)
judge1 / 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.

ソースコード

diff #
プレゼンテーションモードにする

using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using static System.Console;
namespace yukicoder
{
class Program
{
static void Main()
{
var t = Console.ReadLine().Split().ToArray();
var w = int.Parse(t[0]);
var h = int.Parse(t[1]);
var c = t[2];
var str = c;
for (var i = 0; i < h; i++)
{
for (var j = 0; j < w; j++)
{
if (j == 0)
{
continue;
}
if (str[j-1] == 'B')
{
str += 'W';
}
else
{
str += 'B';
}
}
Console.WriteLine(str);
if(str[0] == 'B')
{
str = "W";
}
else
{
str = "B";
}
}
}
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0