結果

問題 No.51 やる気の問題
ユーザー まんしmaNNshi
提出日時 2025-04-01 22:21:03
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 337 bytes
コンパイル時間 1,511 ms
コンパイル使用メモリ 28,324 KB
実行使用メモリ 25,664 KB
最終ジャッジ日時 2025-04-01 22:21:06
合計ジャッジ時間 2,514 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 01 APR 2025 10:21:03 PM):

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

ソースコード

diff #

(defvar W)
(defvar D)
(setq W (parse-integer (read-line)))
(setq D (parse-integer (read-line)))

(defvar work)
(setq work (floor W (* D D)))
(loop while (> W work) do
      (setq D (- D 1))
      (setq W (- W work))
      (setq work (floor W (* D D)))
;      (format t "<~d>~%" W)
;      (format t "<~d>~%" work)
)
(format t "~d~%" work)
0