結果

問題 No.1224 I hate Sqrt Inequality
ユーザー motoshiramotoshira
提出日時 2020-09-21 23:59:25
言語 Common Lisp
(sbcl 2.3.8)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 428 bytes
コンパイル時間 818 ms
コンパイル使用メモリ 31,788 KB
実行使用メモリ 26,904 KB
最終ジャッジ日時 2023-09-07 04:32:20
合計ジャッジ時間 2,075 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
22,884 KB
testcase_01 AC 9 ms
22,784 KB
testcase_02 AC 8 ms
22,852 KB
testcase_03 AC 9 ms
24,880 KB
testcase_04 AC 8 ms
24,912 KB
testcase_05 AC 9 ms
26,904 KB
testcase_06 AC 8 ms
22,896 KB
testcase_07 AC 8 ms
22,888 KB
testcase_08 AC 9 ms
24,860 KB
testcase_09 AC 8 ms
22,944 KB
testcase_10 AC 9 ms
22,896 KB
testcase_11 AC 9 ms
24,884 KB
testcase_12 AC 9 ms
24,884 KB
testcase_13 AC 8 ms
24,936 KB
testcase_14 AC 8 ms
22,912 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 07 SEP 2023 04:32:17 AM):
; processing (DEFUN JUDGE ...)
; processing (DEFUN MAIN ...)
; processing (MAIN)

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

ソースコード

diff #

(defun judge (k)
  (loop while (zerop (mod k 2))
     do
       (setq k (floor k 2)))
  (loop while (zerop (mod k 5))
     do
       (setq k (floor k 5)))
  (/= k 1))


(defun main ()
  (let ((a (read))
        (b (read)))
    (let ((g (gcd a b)))
      (let ((b (/ b g)))
        (if (and (/= b 1)
                 (judge b))
            (princ "Yes")
            (princ "No")))))
  (fresh-line))

(main)
0