結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2025-03-22 08:53:25 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
AC
|
実行時間 | 13 ms / 5,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 1,840 ms |
コンパイル使用メモリ | 24,832 KB |
実行使用メモリ | 19,584 KB |
最終ジャッジ日時 | 2025-03-22 08:53:29 |
合計ジャッジ時間 | 3,527 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 22 MAR 2025 08:53:25 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.031
ソースコード
(defvar X) (defvar Y) (defvar L) (setq X (parse-integer (read-line))) (setq Y (parse-integer (read-line))) (setq L (parse-integer (read-line))) (defparameter o 0) (if (and (= Y 0) (= X 0)) (setq o 0)) (if (and (= Y 0) (/= X 0)) (setq o 1)) (if (and (> Y 0) (= X 0)) (setq o 0)) (if (and (> Y 0) (/= X 0)) (setq o 1)) (if (and (< Y 0) (= X 0)) (setq o 2)) (if (and (< Y 0) (/= X 0)) (setq o 2)) ;(format 't "o=<~d>~%" o) (if (/= X 0) (setq o (+ o (ceiling (abs X) L)))) (if (/= Y 0) (setq o (+ o (ceiling (abs Y) L)))) ;(format 't "o=<~d>~%" o) (format 't "~d~%" o)