結果
問題 | No.82 市松模様 |
ユーザー |
|
提出日時 | 2022-05-31 17:21:20 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 28 ms / 5,000 ms |
コード長 | 1,085 bytes |
コンパイル時間 | 709 ms |
コンパイル使用メモリ | 110,648 KB |
実行使用メモリ | 26,012 KB |
最終ジャッジ日時 | 2024-09-21 01:21:33 |
合計ジャッジ時間 | 1,582 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;namespace yukicoder{class Program{static void Main(string[] args){string[] s = Console.ReadLine().Split(' ');int a = int.Parse(s[0]);//幅int b = int.Parse(s[1]);//高さstring[,] t = new string[b,a ];string bw = "W";if (bw == s[2]){bw = "B";}for(int i = 0; i <b; i++){string f=s[2];string f1=bw;for(int j = 0; j < a; j++){if (i%2==1){f = bw;f1 = s[2];}if (j % 2 == 0){t[i, j] = f;}else{t[i, j] = f1;}Console.Write(t[i, j]);}Console.WriteLine("");}}}}