結果

問題 No.1237 EXP Multiple!
ユーザー ygd.ygd.
提出日時 2020-09-25 23:25:05
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 249 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 109,904 KB
最終ジャッジ日時 2023-09-10 16:21:32
合計ジャッジ時間 4,926 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
75,708 KB
testcase_01 AC 123 ms
98,012 KB
testcase_02 AC 123 ms
100,248 KB
testcase_03 AC 124 ms
100,088 KB
testcase_04 AC 123 ms
99,256 KB
testcase_05 AC 104 ms
103,916 KB
testcase_06 TLE -
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()); MOD = pow(10,9)+7
A = list(map(int,input().split()))
if 0 in A:
  print(-1);exit()
if min(A) >= 4:
  print(MOD);exit()
ans = 1
for x in A:
  kata = math.factorial(x)
  temp = pow(x,kata)
  ans = ans*temp
print(MOD%ans)
0