結果

問題 No.98 円を描こう
ユーザー まんしmaNNshi
提出日時 2025-04-09 23:39:25
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 32,972 KB
実行使用メモリ 25,632 KB
最終ジャッジ日時 2025-04-09 23:39:26
合計ジャッジ時間 1,311 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 09 APR 2025 11:39:25 PM):

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

ソースコード

diff #

(defvar x)
(defvar y)
(defvar temp)
(setq temp (read-from-string (concatenate 'string "(" (read-line) ")")))

(setq x (nth 0 temp))
(setq y (nth 1 temp))
(setq x (coerce x 'double-float))
(setq y (coerce y 'double-float))
(defvar temp)
(defvar ans)
;(setq temp (* (sqrt (+ (* x x ) (* y y))) 2))
(setq temp (sqrt (+ (* x x 4) (* y y 4))) )
;(format t "~f~%" temp)
(setq ans (ceiling temp))

(format t "~d~%" (if (= ans temp) (+ ans 1) ans))
0