結果
問題 |
No.1237 EXP Multiple!
|
ユーザー |
|
提出日時 | 2020-10-01 13:26:58 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 247 bytes |
コンパイル時間 | 205 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 117,096 KB |
最終ジャッジ日時 | 2024-07-07 01:16:55 |
合計ジャッジ時間 | 3,713 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | TLE * 1 -- * 18 |
ソースコード
#yuki1237 import math mod=10**9+7 n=int(input()) l=list(map(int,input().split())) if 0 in l: print(-1) exit() if max(l)>3: print(mod) res=1 for i in l: x=math.factorial(i) y=pow(i,x) res*=y if res>=mod: print(mod) exit() print(mod%res)