結果

問題 No.227 簡単ポーカー
ユーザー まんしmaNNshi
提出日時 2025-03-30 18:02:37
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 10 ms / 5,000 ms
コード長 712 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 32,876 KB
実行使用メモリ 25,636 KB
最終ジャッジ日時 2025-03-30 18:02:39
合計ジャッジ時間 1,075 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 30 MAR 2025 06:02:37 PM):

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

ソースコード

diff #

(defparameter A (read-line))
(setq A (read-from-string (concatenate 'string "(" A ")" )))
(setq A (sort A #'< ))
;;;(print A)

(defparameter p (make-array 14 :initial-element 0))
(loop for i from 0 to 4 do
 (incf (aref p (nth i A)))

)

(defparameter pcnt 0)
(defparameter tcnt 0)
(loop for i from 1 to 13 do
        (if (= (aref P i) 2) (incf pcnt))
        (if (= (aref P i) 3) (incf tcnt))
)
;;(print pcnt)
;(print tcnt)

(if (and (= pcnt 1) (= tcnt 1)) (format t "FULL HOUSE~%"))
(if (and (= pcnt 0) (= tcnt 1)) (format t "THREE CARD~%"))
(if (and (= pcnt 2) (= tcnt 0)) (format t "TWO PAIR~%"))
(if (and (= pcnt 1) (= tcnt 0)) (format t "ONE PAIR~%"))
(if (and (= pcnt 0) (= tcnt 0)) (format t "NO HAND~%"))
0