結果

問題 No.558 575検出するやつ
ユーザー まんしmaNNshi
提出日時 2025-03-29 19:17:55
言語 Common Lisp
(sbcl 2.5.0)
結果
WA  
実行時間 -
コード長 590 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 32,708 KB
実行使用メモリ 27,668 KB
最終ジャッジ日時 2025-03-29 19:17:57
合計ジャッジ時間 1,376 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 2
other AC * 7 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 29 MAR 2025 07:17:55 PM):

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

ソースコード

diff #

(defvar state)
(setq state 1 )
;state
;zero  1
;f5 2
;sev 3
;s5

(defvar ans)
(setq ans "NO~%")
(loop for char = (read-char nil nil) do
    (if (eq char nil) (return))
    (if (not (eq char #\Newline)) (progn
        (values)
    ))
    (case state
        (1
            ;(print "zero")
            (if (eql char #\5) (setq state 2))
        )
        (2   ;(print "f5")
            (if (eql char #\7) (setq state 'sev) (setq state 3))
        )
        (3  ;(print "sev")
            (if (eql char #\5) (progn (setq ans "YES~%") (return)) (setq state 1))
        )
    )
)
(format 't ans)
0