結果

問題 No.1237 EXP Multiple!
ユーザー harurunharurun
提出日時 2020-09-25 21:54:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 1,223 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 27,984 KB
最終ジャッジ日時 2023-09-10 15:22:56
合計ジャッジ時間 4,154 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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