結果
| 問題 | No.1237 EXP Multiple! |
| コンテスト | |
| ユーザー |
motoshira
|
| 提出日時 | 2020-10-14 22:08:03 |
| 言語 | Common Lisp (sbcl 2.6.9) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 612 bytes |
| 記録 | |
| コンパイル時間 | 128 ms |
| コンパイル使用メモリ | 28,416 KB |
| 実行使用メモリ | 120,892 KB |
| 最終ジャッジ日時 | 2026-08-20 12:29:26 |
| 合計ジャッジ時間 | 5,204 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 4 TLE * 1 -- * 13 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 20 AUG 2026 12:29:21 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.023
ソースコード
(defparameter *mod* 1000000007)
(defun fact (x)
(if (zerop x)
1
(* x (fact (1- x)))))
(defun main ()
(let ((n (read)))
(let ((a (loop repeat n collect (read))))
(princ (if (some #'zerop a)
-1
(if (every (lambda (x)
(<= 1 x 3))
a)
(mod *mod* (reduce #'*
(mapcar (lambda (x)
(expt x (fact x)))
a)))
0))))))
(main)
motoshira