結果

問題 No.1237 EXP Multiple!
ユーザー harurun
提出日時 2020-09-25 21:54:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 33,080 KB
最終ジャッジ日時 2024-06-28 06:31:07
合計ジャッジ時間 4,271 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other TLE * 1 -- * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
import sys
pin=sys.stdin.readline
#まじで会わないなんで
def main():
  N=int(pin())
  A=list(map(int,pin().split()))
  ans=1
  mod=10**9+7
  for i in A:
    if i==0:
      print(-1)
      return
    ans*=pow(i,math.factorial(i),mod)
  print(ans%mod)
  return 
main()
0