結果

問題 No.722 100×100=1000
ユーザー Common Lisp
提出日時 2024-11-02 19:10:25
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 507 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 33,588 KB
実行使用メモリ 32,024 KB
最終ジャッジ日時 2024-11-02 19:10:27
合計ジャッジ時間 2,290 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 02 NOV 2024 07:10:25 PM):

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

ソースコード

diff #

(defun check-p (x)
  (let* ((s (write-to-string x))
         (s (if (string= (subseq s 0 1) "-")
                (subseq s 2)
                (subseq s 1))))
    (and x (>= (length s) 2) (= (count #\0 s) (length s)))))

(defun main (&rest argv)
  (declare (ignorable argv))
  (let* ((a (read))
         (b (read))
         (a*b (* a b)))
    (cond
     ((and (check-p a) (check-p b)) (format t "~d~%" (floor a*b 10)))
     ((< (abs a*b) 100000000) (format t "~d~%" a*b))
     (t (format t "E~%")))))

(main)
0