結果
問題 |
No.1237 EXP Multiple!
|
ユーザー |
![]() |
提出日時 | 2020-09-26 06:01:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 179 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 33,292 KB |
最終ジャッジ日時 | 2024-06-28 15:37:12 |
合計ジャッジ時間 | 4,347 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 TLE * 1 -- * 13 |
ソースコード
import math n=int(input()) a=list(map(int,input().split())) if 0 in a: print(-1) exit() MOD=10**9+7 fra=[] if (max(a)>=4): print(MOD) exit() for j in a: fra.append(math.factorial(j)) ans=1 for i in range(n): ans*=(a[i]**fra[i]) print(MOD%ans)