結果

問題 No.1237 EXP Multiple!
ユーザー pluto77
提出日時 2020-10-01 13:21:31
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 237 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 82,248 KB
実行使用メモリ 265,432 KB
最終ジャッジ日時 2024-07-07 01:16:47
合計ジャッジ時間 3,895 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other TLE * 1 -- * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#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:
 res*=pow(i,math.factorial(i))
 if res>=mod:
  print(mod)
  exit()
print(mod%res)
0