結果
| 問題 | No.642 Two Operations No.1 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-07 22:01:15 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 1,202 ms |
| コンパイル使用メモリ | 32,912 KB |
| 実行使用メモリ | 30,240 KB |
| 最終ジャッジ日時 | 2026-05-08 05:29:35 |
| 合計ジャッジ時間 | 1,643 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 08 MAY 2026 05:29:32 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.045
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read)))
(when (= n 1)
(format t "0~%")
(return-from main))
(let* ((s (1- n))
(b (write-to-string s :base 2))
(c (count #\0 b :start 1))
(l (length b)))
(format t "~d~%" (+ l c)))))
(main)
Common Lisp