結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2025-04-11 21:44:23 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 517 bytes |
コンパイル時間 | 445 ms |
コンパイル使用メモリ | 28,796 KB |
実行使用メモリ | 27,800 KB |
最終ジャッジ日時 | 2025-04-11 21:44:31 |
合計ジャッジ時間 | 1,776 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 8 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 11 APR 2025 09:44:28 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.046
ソースコード
(defvar N) (defvar a) (defvar b) (setq N (parse-integer (read-line))) (setq a (read-from-string (concatenate 'string "(" (read-line) ")"))) (setq b (read-from-string (concatenate 'string "(" (read-line) ")"))) ;(print N) ;(print a) ;(print b) (defvar sum) (defvar nokori) (defvar sum 0) (defvar nokori 0) (loop for i from 0 to (- N 1) do (if (= (nth i b) 0) (setq nokori (+ nokori (nth i a))) (setq sum (+ sum (nth i a)))) (values) ) ;(print sum) ;(print nokori) (format t "~a~%" (if (>= nokori sum) "YES" "NO"))