結果
問題 |
No.82 市松模様
|
ユーザー |
|
提出日時 | 2020-03-27 00:01:56 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 511 bytes |
コンパイル時間 | 2,400 ms |
コンパイル使用メモリ | 113,848 KB |
実行使用メモリ | 27,704 KB |
最終ジャッジ日時 | 2025-01-02 07:43:02 |
合計ジャッジ時間 | 1,957 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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; using System.Linq; public class P0082 { public static void Main() { var whc = Console.ReadLine().Trim().Split(' ').ToList(); var w = int.Parse(whc[0]); var h = int.Parse(whc[1]); var c = whc[2]; var a = c == "W" ? "B" : "W"; for(int i=0; i<h; i++) { Console.WriteLine( String.Join( "" , Enumerable.Range(0,w).Select(j => (i+j) % 2 == 0 ? c : a) )); } } }