結果

問題 No.279 木の数え上げ
ユーザー Common Lisp
提出日時 2024-10-09 12:25:30
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 64 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 30,504 KB
実行使用メモリ 38,580 KB
最終ジャッジ日時 2024-10-09 12:25:33
合計ジャッジ時間 2,135 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 09 OCT 2024 12:25:30 PM):

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

ソースコード

diff #

; min {(t の個数), (r の個数), (e の個数) / 2}
; を出力する
(defun main ()
  (let* ((s (read-line))
                  ; count item sequence &key from-end start end key test test-not ⇒ n 
         (t-count (count #\t s))
         (r-count (count #\r s))
         (e-count (floor (count #\e s) 2))
         (ans (min t-count r-count e-count)))
    (princ ans)
    (terpri)))
(main)
0