結果
問題 | No.46 はじめのn歩 |
ユーザー | arito_asu |
提出日時 | 2020-05-12 14:38:32 |
言語 | Common Lisp (sbcl 2.3.8) |
結果 |
WA
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 1,185 ms |
コンパイル使用メモリ | 32,836 KB |
実行使用メモリ | 31,764 KB |
最終ジャッジ日時 | 2024-09-13 12:16:13 |
合計ジャッジ時間 | 1,845 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 13 SEP 2024 12:16:11 PM): ; file: /home/judge/data/code/Main.lisp ; in: SETQ M ; (MOD B A) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::A ; in: SETQ D ; (FLOOR B A) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::A ; in: SETQ A ; (SETQ A (PARSE-INTEGER (FIRST X))) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::A ; in: SETQ M ; (MOD B A) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::B ; in: SETQ D ; (FLOOR B A) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::B ; in: SETQ B ; (SETQ B (PARSE-INTEGER (SECOND X))) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::B ; in: IF (> M 0) ; (+ D 1) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::D ; (SETQ D (+ D 1)) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::D ; in: SETQ D ; (SETQ D (FLOOR B A)) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::D ; ; caught WARNING: ; 3 more uses of undefined variable D ; file: /home/judge/data/code/Main.lisp ; in: IF (> M 0) ; (> M 0) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::M ; in: SETQ M ; (SETQ M (MOD B A)) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::M ; in: SETQ B ; (SECOND X) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::X ; in: SETQ A ; (FIRST X) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::X ; in: SETQ X ; (SETQ X (SPLIT " " (READ-LINE))) ; ; caught WARNING: ; undefined variable: COMMON-LISP-USER::X ; ; compilation unit finished ; Undefined variables: ; A B D M X ; caught 15 WARNING conditions ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.032
ソースコード
(defun split (x str) (let ((pos (search x str)) (size (length x))) (if pos (cons (subseq str 0 pos) (split x (subseq str (+ pos size)))) (list str)))) (setq x (split " " (read-line))) (setq a (parse-integer (first x))) (setq b (parse-integer (second x))) (setq d (floor b a)) (setq m (mod b a)) (if (> m 0)(setq d (+ d 1))(setq d d)) (print d)