結果

問題 No.1237 EXP Multiple!
ユーザー IHIH
提出日時 2020-09-25 21:34:33
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 274 bytes
コンパイル時間 557 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 203,540 KB
最終ジャッジ日時 2023-09-10 14:59:53
合計ジャッジ時間 4,518 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
75,616 KB
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

n = int(input())
a = list(map(int,input().split()))
ans = 1
#b = 1
for i in range(n):
  tmp1 = math.factorial(a[i])
  tmp2 = (a[i]**tmp1)
  ans = tmp2*ans
  #b *= (a[i]**(math.factorial(a[i])))
  
#print(b)
if ans > 0:
  print(((10**9)+7)%ans)
else:
  print(-1)
0