結果

問題 No.1224 I hate Sqrt Inequality
コンテスト
ユーザー motoshira
提出日時 2020-09-21 23:59:25
言語 Common Lisp
(sbcl 2.6.1)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 428 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,177 ms
コンパイル使用メモリ 35,600 KB
実行使用メモリ 32,392 KB
最終ジャッジ日時 2026-03-11 03:17:25
合計ジャッジ時間 863 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 11 MAR 2026 03:17:22 AM):

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

ソースコード

diff #
raw source code

(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