結果

問題 No.46 はじめのn歩
ユーザー arito_asuarito_asu
提出日時 2020-05-12 15:00:35
言語 Common Lisp
(sbcl 2.3.8)
結果
WA  
実行時間 -
コード長 391 bytes
コンパイル時間 494 ms
コンパイル使用メモリ 29,156 KB
実行使用メモリ 28,968 KB
最終ジャッジ日時 2023-10-11 13:43:00
合計ジャッジ時間 1,279 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 11 OCT 2023 01:42:58 PM):
; processing (DEFUN SPLIT ...)
; processing (SETQ X ...)
; processing (SETQ A ...)
; processing (SETQ B ...)
; processing (SETQ D ...)
; processing (SETQ M ...)
; processing (IF (> M ...) ...)
; processing (PRINT D)
; file: /home/judge/data/code/Main.lisp
; in: SETQ A
;     (SETQ A (PARSE-INTEGER (FIRST X)))
; 
; caught WARNING:
;   undefined variable: COMMON-LISP-USER::A

; in: SETQ B
;     (SETQ B (PARSE-INTEGER (SECOND X)))
; 
; caught WARNING:
;   undefined variable: COMMON-LISP-USER::B

; in: PRINT D
;     (PRINT D)
; 
; caught WARNING:
;   undefined variable: COMMON-LISP-USER::D

; in: SETQ D
;     (SETQ D (FLOOR B A))
; 
; caught WARNING:
;   undefined variable: COMMON-LISP-USER::D

; in: SETQ M
;     (SETQ M (MOD B A))
; 
; caught WARNING:
;   undefined variable: COMMON-LISP-USER::M

; 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 6 WARNING conditions


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

ソースコード

diff #

(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)
0