結果
問題 | No.2811 Calculation Within Sequence |
ユーザー |
![]() |
提出日時 | 2024-11-06 23:39:05 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
AC
|
実行時間 | 388 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 1,014 ms |
コンパイル使用メモリ | 27,520 KB |
実行使用メモリ | 28,288 KB |
最終ジャッジ日時 | 2024-11-06 23:39:22 |
合計ジャッジ時間 | 14,113 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 41 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 06 NOV 2024 11:39:08 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.045
ソースコード
(defun main (&rest argv)(declare (ignorable argv))(let* ((a (read))(b (read))(xs (loop repeat a collect (read)))(d (reduce #'gcd xs))(ys (loop repeat b collect (read))))(dolist (y ys)(unless (zerop (mod y d))(format t "No~%")(return-from main)))(format t "Yes~%")))(main)