結果
| 問題 | No.227 簡単ポーカー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-30 18:01:42 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 712 bytes |
| コンパイル時間 | 253 ms |
| コンパイル使用メモリ | 33,132 KB |
| 実行使用メモリ | 27,800 KB |
| 最終ジャッジ日時 | 2025-03-30 18:01:45 |
| 合計ジャッジ時間 | 1,451 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 4 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 30 MAR 2025 06:01:42 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.060
ソースコード
(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 "TWO PAIR~%"))
(if (and (= pcnt 0) (= tcnt 0)) (format t "NO HAND~%"))