結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2018-06-09 13:45:42 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 5 ms / 5,000 ms |
コード長 | 513 bytes |
コンパイル時間 | 11,260 ms |
コンパイル使用メモリ | 225,624 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 12:33:17 |
合計ジャッジ時間 | 11,819 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
package mainimport ("fmt")func main() {var (h intw intc stringcc string)fmt.Scan(&w)fmt.Scan(&h)fmt.Scan(&c)if c == "W" {cc = "B"} else {cc = "W"}for y := 0; y < h; y++ {for x := 0; x < w; x++ {if(y % 2 == x % 2) {fmt.Print(c)} else {fmt.Print(cc)}}fmt.Println("")}}