結果

問題 No.82 市松模様
コンテスト
ユーザー まんしmaNNshi
提出日時 2025-03-27 21:34:56
言語 Common Lisp
(sbcl 2.6.3)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 6 ms / 5,000 ms
コード長 434 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 44 ms
コンパイル使用メモリ 37,868 KB
実行使用メモリ 29,416 KB
最終ジャッジ日時 2026-07-07 23:56:58
合計ジャッジ時間 1,319 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 07 JUL 2026 11:56:56 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.030

ソースコード

diff #
raw source code

(defvar W)
(defvar H)
(defvar C)
(defvar temp)

(setq temp (read-from-string (concatenate 'string "(" (read-line) ")")))
(setq W (nth 0 temp))
(setq H (nth 1 temp))
(setq C (nth 2 temp))

(setq C (if (eq C 'B) #\B #\W))

(defvar sentou)
(loop for i from 1 to H do
 	(setq sentou C )
 	(loop for j from 1 to W do
	 	(format 't "~c" C)
		(setq C (if (eq C #\B ) #\W #\B ))
	)
	(setq C (if (eq sentou #\B ) #\W #\B ))
	(format 't "~%")
)
0