結果
問題 |
No.2750 Number of Prime Factors
|
ユーザー |
|
提出日時 | 2024-05-11 00:47:37 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 1,456 ms |
コンパイル使用メモリ | 32,856 KB |
実行使用メモリ | 31,764 KB |
最終ジャッジ日時 | 2024-12-20 08:12:09 |
合計ジャッジ時間 | 2,176 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 20 DEC 2024 08:12:06 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.025
ソースコード
(defun main () (let* ((n (read)) (primes '(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47)) (m 1) (count 0)) (loop for p in primes while (<= m n) do (progn (setf m (* m p)) (incf count))) (if (> m n) (decf count)) (format t "~D~%" count))) (main)