結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
Rin
|
| 提出日時 | 2015-08-27 16:00:44 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 5,000 ms |
| コード長 | 664 bytes |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 6,816 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2024-07-18 14:59:50 |
| 合計ジャッジ時間 | 831 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
(define (System.out.println x)
(begin
(display x)
(newline)
)
)
(define (CngClr C)
(if (string=? C "W")
"B"
"W"
)
)
(let (
(W (read))
(H (read))
(C (symbol->string (read)))
)
(let loop((i 1) (j 1) (Color C))
(begin
(display Color)
(if (= i W)
(if (= j H)
(newline)
(begin
(newline)
(if (= (modulo W 2) 0)
(loop 1 (+ j 1) Color)
(loop 1 (+ j 1) (CngClr Color))
)
)
)
(loop (+ i 1) j (CngClr Color))
)
)
)
)
Rin